#include <wx/spinctrl.h>
This class supports the following styles:
The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
![]() | ![]() | ![]() |
wxMSW appearance | wxGTK appearance | wxMac appearance |
Public Member Functions | |
wxSpinCtrl () | |
Default constructor. | |
wxSpinCtrl (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &value=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSP_ARROW_KEYS, int min=0, int max=100, int initial=0, const wxString &name="wxSpinCtrl") | |
Constructor, creating and showing a spin control. | |
bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &value=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSP_ARROW_KEYS, int min=0, int max=100, int initial=0, const wxString &name="wxSpinCtrl") |
Creation function called by the spin control constructor. | |
int | GetMax () const |
Gets maximal allowable value. | |
int | GetMin () const |
Gets minimal allowable value. | |
int | GetValue () const |
Gets the value of the spin control. | |
void | SetRange (int minVal, int maxVal) |
Sets range of allowable values. | |
virtual void | SetSelection (long from, long to) |
Select the text in the text part of the control between positions from (inclusive) and to (exclusive). | |
virtual void | SetValue (const wxString &text) |
Sets the value of the spin control. | |
void | SetValue (int value) |
Sets the value of the spin control. |
wxSpinCtrl::wxSpinCtrl | ( | ) |
Default constructor.
wxSpinCtrl::wxSpinCtrl | ( | wxWindow * | parent, | |
wxWindowID | id = wxID_ANY , |
|||
const wxString & | value = wxEmptyString , |
|||
const wxPoint & | pos = wxDefaultPosition , |
|||
const wxSize & | size = wxDefaultSize , |
|||
long | style = wxSP_ARROW_KEYS , |
|||
int | min = 0 , |
|||
int | max = 100 , |
|||
int | initial = 0 , |
|||
const wxString & | name = "wxSpinCtrl" | |||
) |
Constructor, creating and showing a spin control.
parent | Parent window. Must not be NULL. | |
value | Default value (as text). | |
id | Window identifier. The value wxID_ANY indicates a default value. | |
pos | Window position. If wxDefaultPosition is specified then a default position is chosen. | |
size | Window size. If wxDefaultSize is specified then a default size is chosen. | |
style | Window style. See wxSpinButton. | |
min | Minimal value. | |
max | Maximal value. | |
initial | Initial value. | |
name | Window name. |
bool wxSpinCtrl::Create | ( | wxWindow * | parent, | |
wxWindowID | id = wxID_ANY , |
|||
const wxString & | value = wxEmptyString , |
|||
const wxPoint & | pos = wxDefaultPosition , |
|||
const wxSize & | size = wxDefaultSize , |
|||
long | style = wxSP_ARROW_KEYS , |
|||
int | min = 0 , |
|||
int | max = 100 , |
|||
int | initial = 0 , |
|||
const wxString & | name = "wxSpinCtrl" | |||
) |
Creation function called by the spin control constructor.
See wxSpinCtrl() for details.
int wxSpinCtrl::GetMax | ( | ) | const |
Gets maximal allowable value.
int wxSpinCtrl::GetMin | ( | ) | const |
Gets minimal allowable value.
int wxSpinCtrl::GetValue | ( | ) | const |
Gets the value of the spin control.
void wxSpinCtrl::SetRange | ( | int | minVal, | |
int | maxVal | |||
) |
Sets range of allowable values.
virtual void wxSpinCtrl::SetSelection | ( | long | from, | |
long | to | |||
) | [virtual] |
Select the text in the text part of the control between positions from (inclusive) and to (exclusive).
This is similar to wxTextCtrl::SetSelection().
void wxSpinCtrl::SetValue | ( | int | value | ) |
Sets the value of the spin control.
virtual void wxSpinCtrl::SetValue | ( | const wxString & | text | ) | [virtual] |
Sets the value of the spin control.
Use the variant using int instead.
![]() |
[ top ] |