]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/spinbutt.tex
Updated docs for wxGrid::SelectBlock
[wxWidgets.git] / docs / latex / wx / spinbutt.tex
CommitLineData
a660d684
KB
1\section{\class{wxSpinButton}}\label{wxspinbutton}
2
f6bcfd97
BP
3A wxSpinButton has two small up and down (or left and right) arrow buttons. It
4is often used next to a text control for increment and decrementing a value.
5Portable programs should try to use \helpref{wxSpinCtrl}{wxspinctrl} instead
6as wxSpinButton is not implemented for all platforms (Win32 and GTK only
7currently).
a660d684
KB
8
9\wxheading{Derived from}
10
11\helpref{wxControl}{wxcontrol}\\
12\helpref{wxWindow}{wxwindow}\\
13\helpref{wxEvtHandler}{wxevthandler}\\
14\helpref{wxObject}{wxobject}
15
f6bcfd97
BP
16\wxheading{See also}
17
18\helpref{wxSpinCtrl}{wxspinctrl}
19
954b8ae6
JS
20\wxheading{Include files}
21
22<wx/spinbutt.h>
23
a660d684
KB
24\wxheading{Window styles}
25
26\twocolwidtha{5cm}
27\begin{twocollist}\itemsep=0pt
f6bcfd97 28\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button (note that this style is not supported in wxGTK).}
a660d684
KB
29\twocolitem{\windowstyle{wxSP\_VERTICAL}}{Specifies a vertical spin button.}
30\twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys.}
31\twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.}
32\end{twocollist}
33
34See also \helpref{window styles overview}{windowstyles}.
35
a660d684
KB
36\wxheading{Event handling}
37
f6bcfd97
BP
38To process input from a spin button, use one of these event handler macros to
39direct input to member functions that take a
40\helpref{wxSpinEvent}{wxspinevent} argument:
a660d684
KB
41
42\twocolwidtha{7cm}
43\begin{twocollist}
f6bcfd97
BP
44\twocolitem{{\bf EVT\_SPIN(id, func)}}{Generated whenever an arros is pressed.}
45\twocolitem{{\bf EVT\_SPIN\_UP(id, func)}}{Generated when left/up arrow is pressed.}
46\twocolitem{{\bf EVT\_SPIN\_DOWN(id, func)}}{Generated when right/down arrow is pressed.}
a660d684
KB
47\end{twocollist}%
48
49\wxheading{See also}
50
51\helpref{Event handling overview}{eventhandlingoverview}
52
53\latexignore{\rtfignore{\wxheading{Members}}}
54
55\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonconstr}
56
57\func{}{wxSpinButton}{\void}
58
59Default constructor.
60
eaaa6a06 61\func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
a660d684 62\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 63\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
a660d684
KB
64\param{const wxString\& }{name = ``spinButton"}}
65
66Constructor, creating and showing a spin button.
67
68\wxheading{Parameters}
69
70\docparam{parent}{Parent window. Must not be NULL.}
71
72\docparam{id}{Window identifier. A value of -1 indicates a default value.}
73
74\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
75
76\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
77
78\docparam{style}{Window style. See \helpref{wxSpinButton}{wxspinbutton}.}
79
80\docparam{validator}{Window validator.}
81
82\docparam{name}{Window name.}
83
84\wxheading{See also}
85
86\helpref{wxSpinButton::Create}{wxspinbuttoncreate}, \helpref{wxValidator}{wxvalidator}
87
88\membersection{wxSpinButton::\destruct{wxSpinButton}}
89
90\func{void}{\destruct{wxSpinButton}}{\void}
91
92Destructor, destroying the spin button.
93
94\membersection{wxSpinButton::Create}\label{wxspinbuttoncreate}
95
eaaa6a06 96\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
a660d684 97\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 98\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
a660d684
KB
99\param{const wxString\& }{name = ``spinButton"}}
100
101Scrollbar creation function called by the spin button constructor.
102See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonconstr} for details.
103
104\membersection{wxSpinButton::GetMax}\label{wxspinbuttongetmax}
105
106\constfunc{int}{GetMax}{\void}
107
f6bcfd97 108Returns the maximum permissible value.
a660d684
KB
109
110\wxheading{See also}
111
112\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
113
114\membersection{wxSpinButton::GetMin}\label{wxspinbuttongetmin}
115
116\constfunc{int}{GetMin}{\void}
117
f6bcfd97 118Returns the minimum permissible value.
a660d684
KB
119
120\wxheading{See also}
121
122\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
123
124\membersection{wxSpinButton::GetValue}\label{wxspinbuttongetvalue}
125
126\constfunc{int}{GetValue}{\void}
127
128Returns the current spin button value.
129
130\wxheading{See also}
131
132\helpref{wxSpinButton::SetValue}{wxspinbuttonsetvalue}
133
134\membersection{wxSpinButton::SetRange}\label{wxspinbuttonsetrange}
135
eaaa6a06 136\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}}
a660d684
KB
137
138Sets the range of the spin button.
139
140\wxheading{Parameters}
141
142\docparam{min}{The minimum value for the spin button.}
143
144\docparam{max}{The maximum value for the spin button.}
145
146\wxheading{See also}
147
148\helpref{wxSpinButton::GetMin}{wxspinbuttongetmin}, \helpref{wxSpinButton::GetMax}{wxspinbuttongetmax}
149
150\membersection{wxSpinButton::SetValue}\label{wxspinbuttonsetvalue}
151
eaaa6a06 152\func{void}{SetValue}{\param{int}{ value}}
a660d684
KB
153
154Sets the value of the spin button.
155
156\wxheading{Parameters}
157
158\docparam{value}{The value for the spin button.}
159
160\wxheading{See also}
161
162\helpref{wxSpinButton::GetValue}{wxspinbuttongetvalue}
163