]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/spinctrl.tex
GetIcon() returns wxIconLocation, not wxIcon, now
[wxWidgets.git] / docs / latex / wx / spinctrl.tex
1 %
2 % automatically generated by HelpGen from
3 % spinctrl.h at 11/Mar/00 00:22:05
4 %
5
6 \section{\class{wxSpinCtrl}}\label{wxspinctrl}
7
8 wxSpinCtrl combines \helpref{wxTextCtrl}{wxtextctrl} and
9 \helpref{wxSpinButton}{wxspinbutton} in one control.
10
11 \wxheading{Derived from}
12
13 \helpref{wxControl}{wxcontrol}\\
14 \helpref{wxWindow}{wxwindow}\\
15 \helpref{wxEvtHandler}{wxevthandler}\\
16 \helpref{wxObject}{wxobject}
17
18 \wxheading{Include files}
19
20 <wx/spinctrl.h>
21
22 \wxheading{Window styles}
23
24 \twocolwidtha{5cm}
25 \begin{twocollist}\itemsep=0pt
26 \twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys.}
27 \twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.}
28 \end{twocollist}
29
30 \wxheading{Event handling}
31
32 To process input from a spin button, use one of these event handler macros to direct input to member
33 functions that take a \helpref{wxSpinEvent}{wxspinevent} argument:
34
35 \twocolwidtha{7cm}
36 \begin{twocollist}\itemsep=0pt
37 \twocolitem{{\bf EVT\_SPINCTRL(id, func)}}{Generated whenever the numeric value
38 of the spinctrl is updated}
39 \end{twocollist}%
40
41 You may also use the \helpref{wxSpinButton}{wxspinbutton} event macros, however
42 the corresponding events will not be generated under all platforms. Finally, if
43 the user modifies the text in the edit part of the spin control directly, the
44 {\tt EVT\_TEXT} is generated, like for the \helpref{wxTextCtrl}{wxtextctrl}.
45
46 \wxheading{See also}
47
48 \helpref{Event handling overview}{eventhandlingoverview},
49 \helpref{wxSpinButton}{wxspinbutton},
50 \helpref{wxControl}{wxcontrol}
51
52 \latexignore{\rtfignore{\wxheading{Members}}}
53
54 \membersection{wxSpinCtrl::wxSpinCtrl}\label{wxspinctrlwxspinctrl}
55
56 \func{}{wxSpinCtrl}{\void}
57
58 Default constructor.
59
60 \func{}{wxSpinCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = -1}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxSP\_ARROW\_KEYS}, \param{int }{min = 0}, \param{int }{max = 100}, \param{int }{initial = 0}, \param{const wxString\& }{name = \_T("wxSpinCtrl")}}
61
62 Constructor, creating and showing a spin control.
63
64 \wxheading{Parameters}
65
66 \docparam{parent}{Parent window. Must not be NULL.}
67
68 \docparam{value}{Default value.}
69
70 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
71
72 \docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
73
74 \docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
75
76 \docparam{style}{Window style. See \helpref{wxSpinButton}{wxspinbutton}.}
77
78 \docparam{min}{Minimal value.}
79
80 \docparam{max}{Maximal value.}
81
82 \docparam{initial}{Initial value.}
83
84 \docparam{name}{Window name.}
85
86 \wxheading{See also}
87
88 \helpref{wxSpinCtrl::Create}{wxspinctrlcreate}
89
90 \membersection{wxSpinCtrl::Create}\label{wxspinctrlcreate}
91
92 \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = -1}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxSP\_ARROW\_KEYS}, \param{int }{min = 0}, \param{int }{max = 100}, \param{int }{initial = 0}, \param{const wxString\& }{name = \_T("wxSpinCtrl")}}
93
94 Creation function called by the spin control constructor.
95
96 See \helpref{wxSpinCtrl::wxSpinCtrl}{wxspinctrlwxspinctrl} for details.
97
98 \membersection{wxSpinCtrl::SetValue}\label{wxspinctrlsetvalue}
99
100 \func{void}{SetValue}{\param{const wxString\& }{text}}
101
102 \func{void}{SetValue}{\param{int }{value}}
103
104 Sets the value of the spin control.
105
106 \membersection{wxSpinCtrl::GetValue}\label{wxspinctrlgetvalue}
107
108 \constfunc{int}{GetValue}{\void}
109
110 Gets the value of the spin control.
111
112 \membersection{wxSpinCtrl::SetRange}\label{wxspinctrlsetrange}
113
114 \func{void}{SetRange}{\param{int }{minVal}, \param{int }{maxVal}}
115
116 Sets range of allowable values.
117
118 \membersection{wxSpinCtrl::SetSelection}\label{wxspinctrlsetselection}
119
120 \func{void}{SetSelection}{\param{long }{from}, \param{long }{to}}
121
122 Select the text in the text part of the control between positions
123 {\it from} (inclusive) and {\it to} (exclusive). This is similar to
124 \helpref{wxTextCtrl::SetSelection}{wxtextctrlsetselection}.
125
126 {\bf NB:} this is currently only implemented for Windows and generic versions
127 of the control.
128
129 \membersection{wxSpinCtrl::GetMin}\label{wxspinctrlgetmin}
130
131 \constfunc{int}{GetMin}{\void}
132
133 Gets minimal allowable value.
134
135 \membersection{wxSpinCtrl::GetMax}\label{wxspinctrlgetmax}
136
137 \constfunc{int}{GetMax}{\void}
138
139 Gets maximal allowable value.
140