1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxSpinButton}}\label{wxspinbutton}
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
A wxSpinButton has two small up and down (or left and right) arrow buttons. It
|
|
|
|
is often used next to a text control for increment and decrementing a value.
|
|
|
|
Portable programs should try to use \helpref{wxSpinCtrl}{wxspinctrl} instead
|
|
|
|
as wxSpinButton is not implemented for all platforms (Win32 and GTK only
|
|
|
|
currently).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
2000-08-08 02:11:51 -04:00
|
|
|
{\bf NB:} the range supported by this control (and wxSpinCtrl) depends on the
|
2002-05-26 08:46:20 -04:00
|
|
|
platform but is at least {\tt -0x8000} to {\tt 0x7fff}. Under GTK and
|
|
|
|
Win32 with sufficiently new version of {\tt comctrl32.dll} (at least 4.71 is
|
|
|
|
required, 5.80 is recommended) the full 32 bit range is supported.
|
2000-08-08 02:11:51 -04:00
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSpinCtrl}{wxspinctrl}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/spinbutt.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Window styles}
|
|
|
|
|
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
2000-07-15 15:51:35 -04:00
|
|
|
\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button (note that this style is not supported in wxGTK).}
|
1998-05-20 10:25:30 -04:00
|
|
|
\twocolitem{\windowstyle{wxSP\_VERTICAL}}{Specifies a vertical spin button.}
|
|
|
|
\twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys.}
|
|
|
|
\twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.}
|
|
|
|
\end{twocollist}
|
|
|
|
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
|
2002-05-26 08:46:20 -04:00
|
|
|
\input spinevt.inc
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{Event handling overview}{eventhandlingoverview}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonconstr}
|
|
|
|
|
|
|
|
\func{}{wxSpinButton}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
2003-05-14 17:31:03 -04:00
|
|
|
\param{long}{ style = wxSP\_HORIZONTAL},
|
|
|
|
%\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxString\& }{name = ``spinButton"}}
|
|
|
|
|
|
|
|
Constructor, creating and showing a spin button.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{Parent window. Must not be NULL.}
|
|
|
|
|
|
|
|
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
|
|
|
|
|
|
|
|
\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
|
|
|
|
|
|
|
|
\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
|
|
|
|
|
|
|
|
\docparam{style}{Window style. See \helpref{wxSpinButton}{wxspinbutton}.}
|
|
|
|
|
|
|
|
\docparam{validator}{Window validator.}
|
|
|
|
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSpinButton::Create}{wxspinbuttoncreate}, \helpref{wxValidator}{wxvalidator}
|
|
|
|
|
|
|
|
\membersection{wxSpinButton::\destruct{wxSpinButton}}
|
|
|
|
|
|
|
|
\func{void}{\destruct{wxSpinButton}}{\void}
|
|
|
|
|
2002-05-26 08:46:20 -04:00
|
|
|
Destructor, destroys the spin button control.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxSpinButton::Create}\label{wxspinbuttoncreate}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
2003-05-14 17:31:03 -04:00
|
|
|
\param{long}{ style = wxSP\_HORIZONTAL},
|
|
|
|
%\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxString\& }{name = ``spinButton"}}
|
|
|
|
|
|
|
|
Scrollbar creation function called by the spin button constructor.
|
|
|
|
See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonconstr} for details.
|
|
|
|
|
|
|
|
\membersection{wxSpinButton::GetMax}\label{wxspinbuttongetmax}
|
|
|
|
|
|
|
|
\constfunc{int}{GetMax}{\void}
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
Returns the maximum permissible value.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
|
|
|
|
|
|
|
|
\membersection{wxSpinButton::GetMin}\label{wxspinbuttongetmin}
|
|
|
|
|
|
|
|
\constfunc{int}{GetMin}{\void}
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
Returns the minimum permissible value.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
|
|
|
|
|
|
|
|
\membersection{wxSpinButton::GetValue}\label{wxspinbuttongetvalue}
|
|
|
|
|
|
|
|
\constfunc{int}{GetValue}{\void}
|
|
|
|
|
|
|
|
Returns the current spin button value.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSpinButton::SetValue}{wxspinbuttonsetvalue}
|
|
|
|
|
|
|
|
\membersection{wxSpinButton::SetRange}\label{wxspinbuttonsetrange}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Sets the range of the spin button.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{min}{The minimum value for the spin button.}
|
|
|
|
|
|
|
|
\docparam{max}{The maximum value for the spin button.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSpinButton::GetMin}{wxspinbuttongetmin}, \helpref{wxSpinButton::GetMax}{wxspinbuttongetmax}
|
|
|
|
|
|
|
|
\membersection{wxSpinButton::SetValue}\label{wxspinbuttonsetvalue}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{void}{SetValue}{\param{int}{ value}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Sets the value of the spin button.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{value}{The value for the spin button.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSpinButton::GetValue}{wxspinbuttongetvalue}
|
|
|
|
|