]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/spinbutt.tex
More True/False fixes
[wxWidgets.git] / docs / latex / wx / spinbutt.tex
1 \section{\class{wxSpinButton}}\label{wxspinbutton}
2
3 A wxSpinButton has two small up and down (or left and right) arrow buttons. It
4 is often used next to a text control for increment and decrementing a value.
5 Portable programs should try to use \helpref{wxSpinCtrl}{wxspinctrl} instead
6 as wxSpinButton is not implemented for all platforms.
7
8 {\bf NB:} the range supported by this control (and wxSpinCtrl) depends on the
9 platform but is at least {\tt -0x8000} to {\tt 0x7fff}. Under GTK and
10 Win32 with sufficiently new version of {\tt comctrl32.dll} (at least 4.71 is
11 required, 5.80 is recommended) the full 32 bit range is supported.
12
13 \wxheading{Derived from}
14
15 \helpref{wxControl}{wxcontrol}\\
16 \helpref{wxWindow}{wxwindow}\\
17 \helpref{wxEvtHandler}{wxevthandler}\\
18 \helpref{wxObject}{wxobject}
19
20 \wxheading{See also}
21
22 \helpref{wxSpinCtrl}{wxspinctrl}
23
24 \wxheading{Include files}
25
26 <wx/spinbutt.h>
27
28 \wxheading{Window styles}
29
30 \twocolwidtha{5cm}
31 \begin{twocollist}\itemsep=0pt
32 \twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button (note that this style is not supported in wxGTK).}
33 \twocolitem{\windowstyle{wxSP\_VERTICAL}}{Specifies a vertical spin button.}
34 \twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys to change the value.}
35 \twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.}
36 \end{twocollist}
37
38 See also \helpref{window styles overview}{windowstyles}.
39
40 \input spinevt.inc
41
42 \wxheading{See also}
43
44 \helpref{Event handling overview}{eventhandlingoverview}
45
46 \latexignore{\rtfignore{\wxheading{Members}}}
47
48 \membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonconstr}
49
50 \func{}{wxSpinButton}{\void}
51
52 Default constructor.
53
54 \func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
55 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
56 \param{long}{ style = wxSP\_HORIZONTAL},
57 %\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
58 \param{const wxString\& }{name = ``spinButton"}}
59
60 Constructor, 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
86 Destructor, destroys the spin button control.
87
88 \membersection{wxSpinButton::Create}\label{wxspinbuttoncreate}
89
90 \func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
91 \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
92 \param{long}{ style = wxSP\_HORIZONTAL},
93 %\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
94 \param{const wxString\& }{name = ``spinButton"}}
95
96 Scrollbar creation function called by the spin button constructor.
97 See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonconstr} for details.
98
99 \membersection{wxSpinButton::GetMax}\label{wxspinbuttongetmax}
100
101 \constfunc{int}{GetMax}{\void}
102
103 Returns the maximum permissible value.
104
105 \wxheading{See also}
106
107 \helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
108
109 \membersection{wxSpinButton::GetMin}\label{wxspinbuttongetmin}
110
111 \constfunc{int}{GetMin}{\void}
112
113 Returns the minimum permissible value.
114
115 \wxheading{See also}
116
117 \helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
118
119 \membersection{wxSpinButton::GetValue}\label{wxspinbuttongetvalue}
120
121 \constfunc{int}{GetValue}{\void}
122
123 Returns the current spin button value.
124
125 \wxheading{See also}
126
127 \helpref{wxSpinButton::SetValue}{wxspinbuttonsetvalue}
128
129 \membersection{wxSpinButton::SetRange}\label{wxspinbuttonsetrange}
130
131 \func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}}
132
133 Sets the range of the spin button.
134
135 \wxheading{Parameters}
136
137 \docparam{min}{The minimum value for the spin button.}
138
139 \docparam{max}{The maximum value for the spin button.}
140
141 \wxheading{See also}
142
143 \helpref{wxSpinButton::GetMin}{wxspinbuttongetmin}, \helpref{wxSpinButton::GetMax}{wxspinbuttongetmax}
144
145 \membersection{wxSpinButton::SetValue}\label{wxspinbuttonsetvalue}
146
147 \func{void}{SetValue}{\param{int}{ value}}
148
149 Sets the value of the spin button.
150
151 \wxheading{Parameters}
152
153 \docparam{value}{The value for the spin button.}
154
155 \wxheading{See also}
156
157 \helpref{wxSpinButton::GetValue}{wxspinbuttongetvalue}
158