A slider is a control with a handle which can be pulled back and forth to change the value.
On Windows, the track bar control is used.
Slider events are handled in the same way as a scrollbar.
This class supports the following styles:
Handlers bound for the following event types will receive a ScrollEvent parameter.
The EVT_SCROLL_THUMBRELEASE event is only emitted when actually dragging the thumb using the mouse and releasing it (This EVT_SCROLL_THUMBRELEASE event is also followed by an EVT_SCROLL_CHANGED event). The EVT_SCROLL_CHANGED event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen). In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/ moving has finished independently of the way it had started. Please see the widgets sample (“Slider” page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action.
See also
__init__ | Default constructor. |
ClearSel | Clears the selection, for a slider with the ``SL_SELRANGE`` style. |
ClearTicks | Clears the ticks. |
Create | Used for two-step slider construction. |
GetLineSize | Returns the line size. |
GetMax | Gets the maximum slider value. |
GetMin | Gets the minimum slider value. |
GetPageSize | Returns the page size. |
GetRange | |
GetSelEnd | Returns the selection end point. |
GetSelStart | Returns the selection start point. |
GetThumbLength | Returns the thumb length. |
GetTickFreq | Returns the tick frequency. |
GetValue | Gets the current slider value. |
SetLineSize | Sets the line size for the slider. |
SetPageSize | Sets the page size for the slider. |
SetRange | Sets the minimum and maximum slider values. |
SetSelection | Sets the selection. |
SetThumbLength | Sets the slider thumb length. |
SetTick | Sets a tick position. |
SetTickFreq | Sets the tick mark frequency and position. |
SetValue | Sets the slider position. |
LineSize | See GetLineSize and SetLineSize |
Max | See GetMax |
Min | See GetMin |
PageSize | See GetPageSize and SetPageSize |
Range | See GetRange |
SelEnd | See GetSelEnd |
SelStart | See GetSelStart |
ThumbLength | See GetThumbLength and SetThumbLength |
TickFreq | See GetTickFreq and SetTickFreq |
Value | See GetValue and SetValue |
A slider is a control with a handle which can be pulled back and forth to change the value.
Possible constructors:
Slider()
Slider(parent, id=ID_ANY, value=0, minValue=0, maxValue=100,
pos=DefaultPosition, size=DefaultSize, style=SL_HORIZONTAL,
validator=DefaultValidator, name=SliderNameStr)
Overloaded Implementations:
__init__ (self)
Default constructor.
__init__ (self, parent, id=ID_ANY, value=0, minValue=0, maxValue=100, pos=DefaultPosition, size=DefaultSize, style=SL_HORIZONTAL, validator=DefaultValidator, name=SliderNameStr)
Constructor, creating and showing a slider.
Parameters: |
|
---|
Clears the selection, for a slider with the ``SL_SELRANGE`` style.
Availability
Only available for MSW.
Clears the ticks.
Availability
Only available for MSW.
Used for two-step slider construction.
See Slider for further details.
Parameters: | |
---|---|
Return type: | bool |
Returns the line size.
Return type: | int |
---|
See also
Gets the maximum slider value.
Return type: | int |
---|
Gets the minimum slider value.
Return type: | int |
---|
Returns the page size.
Return type: | int |
---|
See also
Returns the selection end point.
Return type: | int |
---|
Availability
Only available for MSW.
See also
Returns the selection start point.
Return type: | int |
---|
Availability
Only available for MSW.
See also
Returns the thumb length.
Return type: | int |
---|
Availability
Only available for MSW.
See also
Returns the tick frequency.
Return type: | int |
---|
Availability
Only available for MSW.
See also
Gets the current slider value.
Return type: | int |
---|
Sets the line size for the slider.
Parameters: | lineSize (int) – The number of steps the slider moves when the user moves it up or down a line. |
---|
See also
Sets the page size for the slider.
Parameters: | pageSize (int) – The number of steps the slider moves when the user pages up or down. |
---|
See also
Sets the minimum and maximum slider values.
Parameters: |
|
---|
Sets the selection.
Parameters: |
|
---|
MSW port.
Availability
Only available for MSW.
See also
Sets the slider thumb length.
Parameters: | len (int) – The thumb length. |
---|
MSW port.
Availability
Only available for MSW.
See also
Sets a tick position.
Parameters: | tickPos (int) – The tick position. |
---|
MSW port.
Availability
Only available for MSW.
See also
Sets the tick mark frequency and position.
Parameters: | n (int) – Frequency. For example, if the frequency is set to two, a tick mark is displayed for every other increment in the slider’s range. |
---|
MSW port.
Availability
Only available for MSW.
See also
Sets the slider position.
Parameters: | value (int) – The slider position. |
---|
See GetLineSize and SetLineSize
See GetPageSize and SetPageSize
See GetSelStart
See GetThumbLength and SetThumbLength
See GetTickFreq and SetTickFreq