]>
git.saurik.com Git - wxWidgets.git/blob - interface/spinctrl.h
e4b068516d116a57805287056f08c12a3a76f90e
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxSpinCtrl class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 wxSpinCtrl combines wxTextCtrl and
14 wxSpinButton in one control.
17 @style{wxSP_ARROW_KEYS}:
18 The user can use arrow keys to change the value.
20 The value wraps at the minimum and maximum.
25 @appearance{spinctrl.png}
28 @ref overview_eventhandlingoverview "Event handling overview", wxSpinButton,
31 class wxSpinCtrl
: public wxControl
38 Constructor, creating and showing a spin control.
41 Parent window. Must not be @NULL.
47 Window identifier. The value wxID_ANY indicates a default value.
50 Window position. If wxDefaultPosition is specified then a default position
54 Window size. If wxDefaultSize is specified then a default size is
58 Window style. See wxSpinButton.
75 wxSpinCtrl(wxWindow
* parent
, wxWindowID id
= -1,
76 const wxString
& value
= wxEmptyString
,
77 const wxPoint
& pos
= wxDefaultPosition
,
78 const wxSize
& size
= wxDefaultSize
,
79 long style
= wxSP_ARROW_KEYS
,
80 int min
= 0, int max
= 100,
87 Creation function called by the spin control constructor.
89 See wxSpinCtrl() for details.
91 bool Create(wxWindow
* parent
, wxWindowID id
= -1,
92 const wxString
& value
= wxEmptyString
,
93 const wxPoint
& pos
= wxDefaultPosition
,
94 const wxSize
& size
= wxDefaultSize
,
95 long style
= wxSP_ARROW_KEYS
,
96 int min
= 0, int max
= 100,
100 Gets maximal allowable value.
105 Gets minimal allowable value.
110 Gets the value of the spin control.
115 Sets range of allowable values.
117 void SetRange(int minVal
, int maxVal
);
120 Select the text in the text part of the control between positions
121 @e from (inclusive) and @e to (exclusive). This is similar to
122 wxTextCtrl::SetSelection.
124 @b NB: this is currently only implemented for Windows and generic versions
127 void SetSelection(long from
, long to
);
131 Sets the value of the spin control.
133 void SetValue(const wxString
& text
);
134 void SetValue(int value
);