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