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
|