<<<<<<<<<<<<<<<<<

ui_slider(ui) HP Widgets ui_slider(ui)

NAME

ui_slider

SUPERCLASS

ui

DESCRIPTION

The ui_slider object provides an interface to the HP XwvaluatorWidgetClass.

INSTANCE VARIABLES

max is the maximum value of the slider.

min is the minimum value of the slider.

move_action is the name of the actions object that is sent a tick! message when the slider bar is moved. Move actions are sent while the bar is moving.

release_action is the name of the actions object that is sent a tick! message when the slider bar is moved with the mouse and the mouse button is released.

value is the current value of the slider.

vertical indicates that the slider should be displayed vertically. Horizontal is the default mode.

MESSAGES

create! creates the widget.

max? returns the value of the max instance variable.

max= sets the value of the max instance variable.

min? returns the value of the min instance variable.

min= sets the value of the min instance variable.

move_action? returns the value of the move_action instance variable.

move_action= sets the value of the move_action instance variable.

release_action? returns the value of the release_action instance variable.

release_action= sets the value of the release_action instance variable.

value? returns the value of the slider.

value= sets the value of the value instance variable and the slider.

vertical? returns the value of the vertical instance variable.

vertical= sets the value of the vertical instance variable.

EXAMPLE

/* create ui and main window */

ui create!;

ui_control_panel new: cp parent= ui;

/* create sliders */

ui_slider new: slider1 parent= cp min= 0 max= 100 vertical= 1 release_action = slider_release_action create! @ x : 10 @ y : 10 @ width : 15 @ height : 100 ;

actions new: slider_release_action tick_actions= `string new: temp_string float_format= `0' = `! slider current value = ' + [slider1 value?]; parser parse: temp_string; temp_string free!;';

/* add exit button */

ui_button new: exit_button parent= cp label= "exit" create! @ x : 50 @ y : 110

action= "exit_action";

actions new: exit_action tick_actions= "ui exit!";

/* display it! */

ui on! start!;

SEE ALSO

ui, ui_text, ui_button, ui_control_panel, ui_row_column


Please send comments and suggestions to
consult@rpi.edu