]>
git.saurik.com Git - wxWidgets.git/blob - interface/spinctrl.h
114faeefb8e261b89ce14799b7d5a66f94e1ba61
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, wxSpinButton, wxControl
30 class wxSpinCtrl
: public wxControl
36 Constructor, creating and showing a spin control.
39 Parent window. Must not be @NULL.
43 Window identifier. The value wxID_ANY indicates a default value.
45 Window position. If wxDefaultPosition is specified then a default
48 Window size. If wxDefaultSize is specified then a default size
51 Window style. See wxSpinButton.
64 wxSpinCtrl(wxWindow
* parent
, wxWindowID id
= -1,
65 const wxString
& value
= wxEmptyString
,
66 const wxPoint
& pos
= wxDefaultPosition
,
67 const wxSize
& size
= wxDefaultSize
,
68 long style
= wxSP_ARROW_KEYS
,
69 int min
= 0, int max
= 100,
75 Creation function called by the spin control constructor.
76 See wxSpinCtrl() for details.
78 bool Create(wxWindow
* parent
, wxWindowID id
= -1,
79 const wxString
& value
= wxEmptyString
,
80 const wxPoint
& pos
= wxDefaultPosition
,
81 const wxSize
& size
= wxDefaultSize
,
82 long style
= wxSP_ARROW_KEYS
,
83 int min
= 0, int max
= 100,
87 Gets maximal allowable value.
92 Gets minimal allowable value.
97 Gets the value of the spin control.
102 Sets range of allowable values.
104 void SetRange(int minVal
, int maxVal
);
107 Select the text in the text part of the control between positions
108 @a from (inclusive) and @a to (exclusive). This is similar to
109 wxTextCtrl::SetSelection.
110 @b NB: this is currently only implemented for Windows and generic versions
113 void SetSelection(long from
, long to
);
117 Sets the value of the spin control.
119 void SetValue(const wxString
& text
);
120 void SetValue(int value
);