WidgetSlider Class
This class creates a slider: horizontal or vertical one.
WidgetSlider Class
This class inherits from WidgetMembers
WidgetSlider (Gui gui, int minimum = 0, int maximum = 100, int initial = 0)
Constructor. Creates a slider with given properties (horizontal one by default).Arguments
- Gui gui - GUI, to which the slider will belong.
- int minimum = 0 - Minimum value.
- int maximum = 100 - Maximum value.
- int initial = 0 - Initial value.
int getButtonHeight ()
Returns the height of the slider handle in pixels (for a vertical slider).Return value
Height of the handle in pixels.int getButtonWidth ()
Returns the width of the slider handle in pixels (for a horizontal slider).Return value
Width of the handle in pixels.int getMaxValue ()
Returns the maximum value of the slider.Return value
Maximum value.int getMinValue ()
Returns the minimum value of the slider.Return value
Minimum value.int getOrientation ()
Returns the current orientation of the slider: horizontal or vertical one.Return value
1 if the orientation is vertical; 0 if it is horizontal.int getValue ()
Returns the current value of the slider, i.e. its position.Return value
Current slider value.void setButtonHeight (int height)
Sets height of the slider handle in pixels (for a vertical slider).Arguments
- int height - Height of the handle in pixels.
void setButtonWidth (int width)
Sets width of the slider handle in pixels (for a horizontal slider).Arguments
- int width - Width of the handle in pixels.
void setMaxValue (int maximum)
Sets the maximum value for the slider.Arguments
- int maximum - Maximum value.
void setMinValue (int minimum)
Sets the minimum value for the slider.Arguments
- int minimum - Minimum value.
void setOrientation (int orientation)
Sets orientation of the slider: horizontal (by default) or vertical one.Arguments
- int orientation - 1 to set horizontal orientation; 0 to set vertical one.
void setValue (int value)
Sets a new current value for the slider, i.e. its position.Arguments
- int value - Slider value.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)