]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/spinbutt.tex
Updated some scripts
[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 8
3ca6a5f0 9{\bf NB:} the range supported by this control (and wxSpinCtrl) depends on the
73c62f54
VZ
10platform but is at least {\tt -0x8000} to {\tt 0x7fff}. Under GTK and
11Win32 with sufficiently new version of {\tt comctrl32.dll} (at least 4.71 is
12required, 5.80 is recommended) the full 32 bit range is supported.
3ca6a5f0 13
a660d684
KB
14\wxheading{Derived from}
15
16\helpref{wxControl}{wxcontrol}\\
17\helpref{wxWindow}{wxwindow}\\
18\helpref{wxEvtHandler}{wxevthandler}\\
19\helpref{wxObject}{wxobject}
20
f6bcfd97
BP
21\wxheading{See also}
22
23\helpref{wxSpinCtrl}{wxspinctrl}
24
954b8ae6
JS
25\wxheading{Include files}
26
27<wx/spinbutt.h>
28
a660d684
KB
29\wxheading{Window styles}
30
31\twocolwidtha{5cm}
32\begin{twocollist}\itemsep=0pt
f6bcfd97 33\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button (note that this style is not supported in wxGTK).}
a660d684
KB
34\twocolitem{\windowstyle{wxSP\_VERTICAL}}{Specifies a vertical spin button.}
35\twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys.}
36\twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.}
37\end{twocollist}
38
39See also \helpref{window styles overview}{windowstyles}.
40
73c62f54 41\input spinevt.inc
a660d684
KB
42
43\wxheading{See also}
44
45\helpref{Event handling overview}{eventhandlingoverview}
46
47\latexignore{\rtfignore{\wxheading{Members}}}
48
49\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonconstr}
50
51\func{}{wxSpinButton}{\void}
52
53Default constructor.
54
eaaa6a06 55\func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
a660d684 56\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 57\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
a660d684
KB
58\param{const wxString\& }{name = ``spinButton"}}
59
60Constructor, creating and showing a spin button.
61
62\wxheading{Parameters}
63
64\docparam{parent}{Parent window. Must not be NULL.}
65
66\docparam{id}{Window identifier. A value of -1 indicates a default value.}
67
68\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
69
70\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
71
72\docparam{style}{Window style. See \helpref{wxSpinButton}{wxspinbutton}.}
73
74\docparam{validator}{Window validator.}
75
76\docparam{name}{Window name.}
77
78\wxheading{See also}
79
80\helpref{wxSpinButton::Create}{wxspinbuttoncreate}, \helpref{wxValidator}{wxvalidator}
81
82\membersection{wxSpinButton::\destruct{wxSpinButton}}
83
84\func{void}{\destruct{wxSpinButton}}{\void}
85
73c62f54 86Destructor, destroys the spin button control.
a660d684
KB
87
88\membersection{wxSpinButton::Create}\label{wxspinbuttoncreate}
89
eaaa6a06 90\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
a660d684 91\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 92\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
a660d684
KB
93\param{const wxString\& }{name = ``spinButton"}}
94
95Scrollbar creation function called by the spin button constructor.
96See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonconstr} for details.
97
98\membersection{wxSpinButton::GetMax}\label{wxspinbuttongetmax}
99
100\constfunc{int}{GetMax}{\void}
101
f6bcfd97 102Returns the maximum permissible value.
a660d684
KB
103
104\wxheading{See also}
105
106\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
107
108\membersection{wxSpinButton::GetMin}\label{wxspinbuttongetmin}
109
110\constfunc{int}{GetMin}{\void}
111
f6bcfd97 112Returns the minimum permissible value.
a660d684
KB
113
114\wxheading{See also}
115
116\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
117
118\membersection{wxSpinButton::GetValue}\label{wxspinbuttongetvalue}
119
120\constfunc{int}{GetValue}{\void}
121
122Returns the current spin button value.
123
124\wxheading{See also}
125
126\helpref{wxSpinButton::SetValue}{wxspinbuttonsetvalue}
127
128\membersection{wxSpinButton::SetRange}\label{wxspinbuttonsetrange}
129
eaaa6a06 130\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}}
a660d684
KB
131
132Sets the range of the spin button.
133
134\wxheading{Parameters}
135
136\docparam{min}{The minimum value for the spin button.}
137
138\docparam{max}{The maximum value for the spin button.}
139
140\wxheading{See also}
141
142\helpref{wxSpinButton::GetMin}{wxspinbuttongetmin}, \helpref{wxSpinButton::GetMax}{wxspinbuttongetmax}
143
144\membersection{wxSpinButton::SetValue}\label{wxspinbuttonsetvalue}
145
eaaa6a06 146\func{void}{SetValue}{\param{int}{ value}}
a660d684
KB
147
148Sets the value of the spin button.
149
150\wxheading{Parameters}
151
152\docparam{value}{The value for the spin button.}
153
154\wxheading{See also}
155
156\helpref{wxSpinButton::GetValue}{wxspinbuttongetvalue}
157