2000-03-11 10:06:36 +00:00
|
|
|
%
|
|
|
|
% automatically generated by HelpGen from
|
|
|
|
% spinctrl.h at 11/Mar/00 00:22:05
|
|
|
|
%
|
|
|
|
|
|
|
|
\section{\class{wxSpinCtrl}}\label{wxspinctrl}
|
|
|
|
|
|
|
|
wxSpinCtrl combines \helpref{wxTextCtrl}{wxtextctrl} and
|
|
|
|
\helpref{wxSpinButton}{wxspinbutton} in one control.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/spinctrl.h>
|
|
|
|
|
|
|
|
\wxheading{Window styles}
|
|
|
|
|
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\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}
|
|
|
|
|
|
|
|
\wxheading{Event handling}
|
|
|
|
|
|
|
|
To process input from a spin button, use one of these event handler macros to direct input to member
|
2000-07-15 19:51:35 +00:00
|
|
|
functions that take a \helpref{wxSpinEvent}{wxspinevent} argument:
|
2000-03-11 10:06:36 +00:00
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
2000-03-14 11:25:54 +00:00
|
|
|
\begin{twocollist}\itemsep=0pt
|
2002-05-26 12:46:20 +00:00
|
|
|
\twocolitem{{\bf EVT\_SPINCTRL(id, func)}}{Generated whenever the numeric value
|
|
|
|
of the spinctrl is updated}
|
2000-03-11 10:06:36 +00:00
|
|
|
\end{twocollist}%
|
|
|
|
|
2002-05-26 12:46:20 +00:00
|
|
|
You may also use the \helpref{wxSpinButton}{wxspinbutton} event macros, however
|
|
|
|
the corresponding events will not be generated under all platforms. Finally, if
|
|
|
|
the user modifies the text in the edit part of the spin control directly, the
|
|
|
|
{\tt EVT\_TEXT} is generated, like for the \helpref{wxTextCtrl}{wxtextctrl}.
|
|
|
|
|
2000-03-11 10:06:36 +00:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{Event handling overview}{eventhandlingoverview},
|
|
|
|
\helpref{wxSpinButton}{wxspinbutton},
|
|
|
|
\helpref{wxControl}{wxcontrol}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxSpinCtrl::wxSpinCtrl}\label{wxspinctrlwxspinctrl}
|
|
|
|
|
|
|
|
\func{}{wxSpinCtrl}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
|
|
|
\func{}{wxSpinCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = -1}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxSP\_ARROW\_KEYS}, \param{int }{min = 0}, \param{int }{max = 100}, \param{int }{initial = 0}, \param{const wxString\& }{name = \_T("wxSpinCtrl")}}
|
|
|
|
|
|
|
|
Constructor, creating and showing a spin control.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{Parent window. Must not be NULL.}
|
|
|
|
|
|
|
|
\docparam{value}{Default value.}
|
|
|
|
|
|
|
|
\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{min}{Minimal value.}
|
|
|
|
|
|
|
|
\docparam{max}{Maximal value.}
|
|
|
|
|
|
|
|
\docparam{initial}{Initial value.}
|
|
|
|
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSpinCtrl::Create}{wxspinctrlcreate}
|
|
|
|
|
|
|
|
\membersection{wxSpinCtrl::Create}\label{wxspinctrlcreate}
|
|
|
|
|
|
|
|
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = -1}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxSP\_ARROW\_KEYS}, \param{int }{min = 0}, \param{int }{max = 100}, \param{int }{initial = 0}, \param{const wxString\& }{name = \_T("wxSpinCtrl")}}
|
|
|
|
|
|
|
|
Creation function called by the spin control constructor.
|
|
|
|
|
2000-03-14 11:25:54 +00:00
|
|
|
See \helpref{wxSpinCtrl::wxSpinCtrl}{wxspinctrlwxspinctrl} for details.
|
2000-03-11 10:06:36 +00:00
|
|
|
|
|
|
|
\membersection{wxSpinCtrl::SetValue}\label{wxspinctrlsetvalue}
|
|
|
|
|
|
|
|
\func{void}{SetValue}{\param{const wxString\& }{text}}
|
|
|
|
|
|
|
|
\func{void}{SetValue}{\param{int }{value}}
|
|
|
|
|
|
|
|
Sets the value of the spin control.
|
|
|
|
|
|
|
|
\membersection{wxSpinCtrl::GetValue}\label{wxspinctrlgetvalue}
|
|
|
|
|
|
|
|
\constfunc{int}{GetValue}{\void}
|
|
|
|
|
|
|
|
Gets the value of the spin control.
|
|
|
|
|
|
|
|
\membersection{wxSpinCtrl::SetRange}\label{wxspinctrlsetrange}
|
|
|
|
|
|
|
|
\func{void}{SetRange}{\param{int }{minVal}, \param{int }{maxVal}}
|
|
|
|
|
|
|
|
Sets range of allowable values.
|
|
|
|
|
2002-08-30 21:28:56 +00:00
|
|
|
\membersection{wxSpinCtrl::SetSelection}\label{wxspinctrlsetselection}
|
|
|
|
|
|
|
|
\func{void}{SetSelection}{\param{long }{from}, \param{long }{to}}
|
|
|
|
|
|
|
|
Select the text in the text part of the control between positions
|
|
|
|
{\it from} (inclusive) and {\it to} (exclusive). This is similar to
|
|
|
|
\helpref{wxTextCtrl::SetSelection}{wxtextctrlsetselection}.
|
|
|
|
|
|
|
|
{\bf NB:} this is currently only implemented for Windows and generic versions
|
|
|
|
of the control.
|
|
|
|
|
2000-03-11 10:06:36 +00:00
|
|
|
\membersection{wxSpinCtrl::GetMin}\label{wxspinctrlgetmin}
|
|
|
|
|
|
|
|
\constfunc{int}{GetMin}{\void}
|
|
|
|
|
|
|
|
Gets minimal allowable value.
|
|
|
|
|
|
|
|
\membersection{wxSpinCtrl::GetMax}\label{wxspinctrlgetmax}
|
|
|
|
|
|
|
|
\constfunc{int}{GetMax}{\void}
|
|
|
|
|
|
|
|
Gets maximal allowable value.
|
|
|
|
|