wxspinbuttona wxspinbutton has two small up and down (or left and right) arrow buttons. it is often used next to a text control for increment and decrementing a value. portable programs should try to use wxspinctrl instead as wxspinbutton is not implemented for all platforms but wxspinctrl is as it degenerates to a simple wxtextctrl on such platforms. nb: the range supported by this control (and wxspinctrl) depends on the platform but is at least -0x8000 to 0x7fff. under gtk and win32 with sufficiently new version of comctrl32.dll (at least 4.71 is required, 5.80 is recommended) the full 32 bit range is supported. derived from
wxcontrol see also include files <wx/spinbutt.h> window styles
see also window styles overview. event handling to process input from a spin button, use one of these event handler macros to direct input to member functions that take a wxspinevent argument:
members
wxspinbutton::wxspinbutton
wxspinbutton::wxspinbuttonwxspinbutton() default constructor. wxspinbutton(wxwindow* parent, wxwindowid id, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxsp_horizontal, const wxstring& name = "spinbutton") constructor, creating and showing a spin button. parameters parent
id
pos
size
style
name
see also
wxspinbutton::~wxspinbuttonvoid ~wxspinbutton() destructor, destroys the spin button control.
wxspinbutton::createbool create(wxwindow* parent, wxwindowid id, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxsp_horizontal, const wxstring& name = "spinbutton") scrollbar creation function called by the spin button constructor. see wxspinbutton::wxspinbutton for details.
wxspinbutton::getmaxint getmax() const returns the maximum permissible value. see also
wxspinbutton::getminint getmin() const returns the minimum permissible value. see also
wxspinbutton::getvalueint getvalue() const returns the current spin button value. see also
wxspinbutton::setrangevoid setrange(int min, int max) sets the range of the spin button. parameters min
max
see also wxspinbutton::getmin, wxspinbutton::getmax
wxspinbutton::setvaluevoid setvalue(int value) sets the value of the spin button. parameters value
see also
|