wxSlider

wxSlider

wxSlider
Functions for wxSlider class

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.

On GTK+, tick marks are only available for version 2.16 and later.

Slider generates the same events as wxScrollBar but in practice the most convenient way to process wxSlider updates is by handling the slider-specific wxEVT_SLIDER event which carries wxCommandEvent containing just the latest slider position.

Styles

This class supports the following styles:

The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED

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 page_samples_widgets ("Slider" page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action.

See: Overview events, wxScrollBar

This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler

wxWidgets docs: wxSlider

Destructor, destroying the slider.

Types

This = wxSlider()
Value = integer()

Sets the slider position.