1 \section{\class{wxSpinButton
}}\label{wxspinbutton
}
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 (Win32 and GTK only
9 {\bf NB:
} the range supported by this control (and wxSpinCtrl) depends on the
10 platform but is at least
{\tt -
0x8000} to
{\tt 0x7fff}. Under GTK and
11 Win32 with sufficiently new version of
{\tt comctrl32.dll
} (at least
4.71 is
12 required,
5.80 is recommended) the full
32 bit range is supported.
14 \wxheading{Derived from
}
16 \helpref{wxControl
}{wxcontrol
}\\
17 \helpref{wxWindow
}{wxwindow
}\\
18 \helpref{wxEvtHandler
}{wxevthandler
}\\
19 \helpref{wxObject
}{wxobject
}
23 \helpref{wxSpinCtrl
}{wxspinctrl
}
25 \wxheading{Include files
}
29 \wxheading{Window styles
}
32 \begin{twocollist
}\itemsep=
0pt
33 \twocolitem{\windowstyle{wxSP
\_HORIZONTAL}}{Specifies a horizontal spin button (note that this style is not supported in wxGTK).
}
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.
}
39 See also
\helpref{window styles overview
}{windowstyles
}.
45 \helpref{Event handling overview
}{eventhandlingoverview
}
47 \latexignore{\rtfignore{\wxheading{Members
}}}
49 \membersection{wxSpinButton::wxSpinButton
}\label{wxspinbuttonconstr
}
51 \func{}{wxSpinButton
}{\void}
55 \func{}{wxSpinButton
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{id
},
\rtfsp
56 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
57 \param{long
}{ style = wxSP
\_HORIZONTAL},
58 %\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
59 \param{const wxString\&
}{name = ``spinButton"
}}
61 Constructor, creating and showing a spin button.
63 \wxheading{Parameters
}
65 \docparam{parent
}{Parent window. Must not be NULL.
}
67 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
69 \docparam{pos
}{Window position. If the position (-
1, -
1) is specified then a default position is chosen.
}
71 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then a default size is chosen.
}
73 \docparam{style
}{Window style. See
\helpref{wxSpinButton
}{wxspinbutton
}.
}
75 \docparam{validator
}{Window validator.
}
77 \docparam{name
}{Window name.
}
81 \helpref{wxSpinButton::Create
}{wxspinbuttoncreate
},
\helpref{wxValidator
}{wxvalidator
}
83 \membersection{wxSpinButton::
\destruct{wxSpinButton
}}
85 \func{void
}{\destruct{wxSpinButton
}}{\void}
87 Destructor, destroys the spin button control.
89 \membersection{wxSpinButton::Create
}\label{wxspinbuttoncreate
}
91 \func{bool
}{Create
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{id
},
\rtfsp
92 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
93 \param{long
}{ style = wxSP
\_HORIZONTAL},
94 %\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
95 \param{const wxString\&
}{name = ``spinButton"
}}
97 Scrollbar creation function called by the spin button constructor.
98 See
\helpref{wxSpinButton::wxSpinButton
}{wxspinbuttonconstr
} for details.
100 \membersection{wxSpinButton::GetMax
}\label{wxspinbuttongetmax
}
102 \constfunc{int
}{GetMax
}{\void}
104 Returns the maximum permissible value.
108 \helpref{wxSpinButton::SetRange
}{wxspinbuttonsetrange
}
110 \membersection{wxSpinButton::GetMin
}\label{wxspinbuttongetmin
}
112 \constfunc{int
}{GetMin
}{\void}
114 Returns the minimum permissible value.
118 \helpref{wxSpinButton::SetRange
}{wxspinbuttonsetrange
}
120 \membersection{wxSpinButton::GetValue
}\label{wxspinbuttongetvalue
}
122 \constfunc{int
}{GetValue
}{\void}
124 Returns the current spin button value.
128 \helpref{wxSpinButton::SetValue
}{wxspinbuttonsetvalue
}
130 \membersection{wxSpinButton::SetRange
}\label{wxspinbuttonsetrange
}
132 \func{void
}{SetRange
}{\param{int
}{ min
},
\param{int
}{ max
}}
134 Sets the range of the spin button.
136 \wxheading{Parameters
}
138 \docparam{min
}{The minimum value for the spin button.
}
140 \docparam{max
}{The maximum value for the spin button.
}
144 \helpref{wxSpinButton::GetMin
}{wxspinbuttongetmin
},
\helpref{wxSpinButton::GetMax
}{wxspinbuttongetmax
}
146 \membersection{wxSpinButton::SetValue
}\label{wxspinbuttonsetvalue
}
148 \func{void
}{SetValue
}{\param{int
}{ value
}}
150 Sets the value of the spin button.
152 \wxheading{Parameters
}
154 \docparam{value
}{The value for the spin button.
}
158 \helpref{wxSpinButton::GetValue
}{wxspinbuttongetvalue
}