Inheritance diagram for wx.Slider:
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.
See also
Window Style | Description |
---|---|
wx.SL_HORIZONTAL | Displays the slider horizontally (this is the default). |
wx.SL_VERTICAL | Displays the slider vertically. |
wx.SL_AUTOTICKS | Displays tick marks. |
wx.SL_LABELS | Displays minimum, maximum and value labels. |
wx.SL_LEFT | Displays ticks on the left and forces the slider to be vertical. |
wx.SL_RIGHT | Displays ticks on the right and forces the slider to be vertical. |
wx.SL_TOP | Displays ticks on the top. |
wx.SL_BOTTOM | Displays ticks on the bottom (this is the default). |
wx.SL_SELRANGE | Allows the user to select a range on the slider. Windows only. |
wx.SL_INVERSE | Inverses the mininum and maximum endpoints on the slider. Not compatible with wx.SL_SELRANGE. |
To process a scroll event, use these event handler macros to direct input to member functions that take a wx.ScrollEvent argument. You can use EVT_COMMAND_SCROLL... macros with window IDs for when intercepting scroll events from controls, or EVT_SCROLL... macros without window IDs for intercepting scroll events from the receiving window – except for this, the macros behave exactly the same.
Event Name | Description |
---|---|
wx.EVT_SCROLL(func) | Process all scroll events. |
wx.EVT_SCROLL_TOP(func) | Process wx.wxEVT_SCROLL_TOP scroll-to-top events (minimum position). |
wx.EVT_SCROLL_BOTTOM(func) | Process wx.wxEVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position). |
wx.EVT_SCROLL_LINEUP(func) | Process wx.wxEVT_SCROLL_LINEUP line up events. |
wx.EVT_SCROLL_LINEDOWN(func) | Process wx.wxEVT_SCROLL_LINEDOWN line down events. |
wx.EVT_SCROLL_PAGEUP(func) | Process wx.wxEVT_SCROLL_PAGEUP page up events. |
wx.EVT_SCROLL_PAGEDOWN(func) | Process wx.wxEVT_SCROLL_PAGEDOWN page down events. |
wx.EVT_SCROLL_THUMBTRACK(func) | Process wx.wxEVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumbtrack). |
wx.EVT_SCROLL_THUMBRELEASE(func) | Process wx.wxEVT_SCROLL_THUMBRELEASE thumb release events. |
wx.EVT_SCROLL_CHANGED(func) | Process wx.wxEVT_SCROLL_CHANGED end of scrolling events (MSW only). |
wx.EVT_COMMAND_SCROLL(id, func) | Process all scroll events. |
wx.EVT_COMMAND_SCROLL_TOP(id, func) | Process wx.wxEVT_SCROLL_TOP scroll-to-top events (minimum position). |
wx.EVT_COMMAND_SCROLL_BOTTOM(id, func) | Process wx.wxEVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position). |
wx.EVT_COMMAND_SCROLL_LINEUP(id, func) | Process wx.wxEVT_SCROLL_LINEUP line up events. |
wx.EVT_COMMAND_SCROLL_LINEDOWN(id, func) | Process wx.wxEVT_SCROLL_LINEDOWN line down events. |
wx.EVT_COMMAND_SCROLL_PAGEUP(id, func) | Process wx.wxEVT_SCROLL_PAGEUP page up events. |
wx.EVT_COMMAND_SCROLL_PAGEDOWN(id, func) | Process wx.wxEVT_SCROLL_PAGEDOWN page down events. |
wx.EVT_COMMAND_SCROLL_THUMBTRACK(id, func) | Process wx.wxEVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumbtrack). |
wx.EVT_COMMAND_SCROLL_THUMBRELEASE(func) | Process wx.wxEVT_SCROLL_THUMBRELEASE thumb release events. |
wx.EVT_COMMAND_SCROLL_CHANGED(func) | Process wx.wxEVT_SCROLL_CHANGED end of scrolling events (MSW only). |
Constructor, creating and showing a slider.
Parameters:
Returns:
Note
Windows 95 only.
Note
Windows 95 only.
Returns the line size.
Returns:
int
See also
Gets the maximum slider value.
Returns:
int
Gets the minimum slider value.
Returns:
int
Returns the page size.
Returns:
int
See also
Returns the selection end point.
Returns:
int
Note
Windows 95 only.
See also
Returns the selection start point.
Returns:
int
Note
Windows 95 only.
See also
Returns the thumb length.
Returns:
int
Note
Windows 95 only.
See also
Returns the tick frequency.
Returns:
int
Note
Windows 95 only.
See also
Gets the current slider value.
Returns:
int
Sets the line size for the slider.
Parameters:
See also
Parameters:
Parameters:
Sets the page size for the slider.
Parameters:
See also
Sets the minimum and maximum slider values.
Parameters:
Sets the selection.
Parameters:
Note
Windows 95 only.
See also
Sets the slider thumb length.
Parameters:
Note
Windows 95 only.
See also
Sets a tick position.
Parameters:
Note
Windows 95 only.
See also
Sets the tick mark frequency and position.
Parameters:
Note
Windows 95 only.
See also
Sets the slider position.
Parameters: