wxslidera 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. derived from
wxcontrol include files <wx/slider.h> window styles
see also window styles overview. event table macros to process a scroll event, use these event handler macros to direct input to member functions that take a wxscrollevent 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.
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 widgets sample ("slider" page) to see the difference between evt_scroll_thumbrelease and evt_scroll_changed in action. see also event handling overview, wxscrollbar members
wxslider::wxslider
wxslider::wxsliderwxslider() default slider. wxslider(wxwindow* parent, wxwindowid id, int value , int minvalue, int maxvalue, const wxpoint& point = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxsl_horizontal, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "slider") constructor, creating and showing a slider. parameters parent
id
value
minvalue
maxvalue
size
style
validator
name
see also
wxslider::~wxslidervoid ~wxslider() destructor, destroying the slider.
wxslider::clearselvoid clearsel() clears the selection, for a slider with the wxsl_selrange style. remarks windows 95 only.
wxslider::clearticksvoid clearticks() clears the ticks. remarks windows 95 only.
wxslider::createbool create(wxwindow* parent, wxwindowid id, int value , int minvalue, int maxvalue, const wxpoint& point = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxsl_horizontal, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "slider") used for two-step slider construction. see wxslider::wxslider for further details.
wxslider::getlinesizeint getlinesize() const returns the line size. see also
wxslider::getmaxint getmax() const gets the maximum slider value. see also wxslider::getmin, wxslider::setrange
wxslider::getminint getmin() const gets the minimum slider value. see also wxslider::getmin, wxslider::setrange
wxslider::getpagesizeint getpagesize() const returns the page size. see also
wxslider::getselendint getselend() const returns the selection end point. remarks windows 95 only. see also wxslider::getselstart, wxslider::setselection
wxslider::getselstartint getselstart() const returns the selection start point. remarks windows 95 only. see also wxslider::getselend, wxslider::setselection
wxslider::getthumblengthint getthumblength() const returns the thumb length. remarks windows 95 only. see also
wxslider::gettickfreqint gettickfreq() const returns the tick frequency. remarks windows 95 only. see also
wxslider::getvalueint getvalue() const gets the current slider value. see also wxslider::getmin, wxslider::getmax, wxslider::setvalue
wxslider::setlinesizevoid setlinesize(int linesize) sets the line size for the slider. parameters linesize
see also
wxslider::setpagesizevoid setpagesize(int pagesize) sets the page size for the slider. parameters pagesize
see also
wxslider::setrangevoid setrange(int minvalue, int maxvalue) sets the minimum and maximum slider values. see also wxslider::getmin, wxslider::getmax
wxslider::setselectionvoid setselection(int startpos, int endpos) sets the selection. parameters startpos
endpos
remarks windows 95 only. see also wxslider::getselstart, wxslider::getselend
wxslider::setthumblengthvoid setthumblength(int len) sets the slider thumb length. parameters len
remarks windows 95 only. see also
wxslider::settickvoid settick(int tickpos) sets a tick position. parameters tickpos
remarks windows 95 only. see also
wxslider::settickfreqvoid settickfreq(int n, int pos) sets the tick mark frequency and position. parameters n
pos
remarks windows 95 only. see also
wxslider::setvaluevoid setvalue(int value) sets the slider position. parameters value
see also
|