2 % automatically generated by HelpGen from
3 % spinctrl.h at 11/Mar/00 00:22:05
6 \section{\class{wxSpinCtrl
}}\label{wxspinctrl
}
8 wxSpinCtrl combines
\helpref{wxTextCtrl
}{wxtextctrl
} and
9 \helpref{wxSpinButton
}{wxspinbutton
} in one control.
11 \wxheading{Derived from
}
13 \helpref{wxControl
}{wxcontrol
}\\
14 \helpref{wxWindow
}{wxwindow
}\\
15 \helpref{wxEvtHandler
}{wxevthandler
}\\
16 \helpref{wxObject
}{wxobject
}
18 \wxheading{Include files
}
24 \helpref{wxCore
}{librarieslist
}
26 \wxheading{Window styles
}
29 \begin{twocollist
}\itemsep=
0pt
30 \twocolitem{\windowstyle{wxSP
\_ARROW\_KEYS}}{The user can use arrow keys to change the value.
}
31 \twocolitem{\windowstyle{wxSP
\_WRAP}}{The value wraps at the minimum and maximum.
}
34 \wxheading{Event handling
}
36 To process input from a spin button, use one of these event handler macros to direct input to member
37 functions that take a
\helpref{wxSpinEvent
}{wxspinevent
} argument:
40 \begin{twocollist
}\itemsep=
0pt
41 \twocolitem{{\bf EVT
\_SPINCTRL(id, func)
}}{Generated whenever the numeric value
42 of the spinctrl is updated
}
45 You may also use the
\helpref{wxSpinButton
}{wxspinbutton
} event macros, however
46 the corresponding events will not be generated under all platforms. Finally, if
47 the user modifies the text in the edit part of the spin control directly, the
48 {\tt EVT
\_TEXT} is generated, like for the
\helpref{wxTextCtrl
}{wxtextctrl
}.
50 When the use enters text into the text area, the text is not
51 validated until the control loses focus (e.g. by using the TAB
52 key). The value is then adjusted to the range and a
53 \helpref{wxSpinEvent
}{wxspinevent
} sent then if the value
54 is different from the last value sent.
58 \helpref{Event handling overview
}{eventhandlingoverview
},
59 \helpref{wxSpinButton
}{wxspinbutton
},
60 \helpref{wxControl
}{wxcontrol
}
62 \latexignore{\rtfignore{\wxheading{Members
}}}
64 \membersection{wxSpinCtrl::wxSpinCtrl
}\label{wxspinctrlwxspinctrl
}
66 \func{}{wxSpinCtrl
}{\void}
70 \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")
}}
72 Constructor, creating and showing a spin control.
74 \wxheading{Parameters
}
76 \docparam{parent
}{Parent window. Must not be NULL.
}
78 \docparam{value
}{Default value.
}
80 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
82 \docparam{pos
}{Window position. If the position (-
1, -
1) is specified then a default position is chosen.
}
84 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then a default size is chosen.
}
86 \docparam{style
}{Window style. See
\helpref{wxSpinButton
}{wxspinbutton
}.
}
88 \docparam{min
}{Minimal value.
}
90 \docparam{max
}{Maximal value.
}
92 \docparam{initial
}{Initial value.
}
94 \docparam{name
}{Window name.
}
98 \helpref{wxSpinCtrl::Create
}{wxspinctrlcreate
}
100 \membersection{wxSpinCtrl::Create
}\label{wxspinctrlcreate
}
102 \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")
}}
104 Creation function called by the spin control constructor.
106 See
\helpref{wxSpinCtrl::wxSpinCtrl
}{wxspinctrlwxspinctrl
} for details.
108 \membersection{wxSpinCtrl::SetValue
}\label{wxspinctrlsetvalue
}
110 \func{void
}{SetValue
}{\param{const wxString\&
}{text
}}
112 \func{void
}{SetValue
}{\param{int
}{value
}}
114 Sets the value of the spin control.
116 \membersection{wxSpinCtrl::GetValue
}\label{wxspinctrlgetvalue
}
118 \constfunc{int
}{GetValue
}{\void}
120 Gets the value of the spin control.
122 \membersection{wxSpinCtrl::SetRange
}\label{wxspinctrlsetrange
}
124 \func{void
}{SetRange
}{\param{int
}{minVal
},
\param{int
}{maxVal
}}
126 Sets range of allowable values.
128 \membersection{wxSpinCtrl::SetSelection
}\label{wxspinctrlsetselection
}
130 \func{void
}{SetSelection
}{\param{long
}{from
},
\param{long
}{to
}}
132 Select the text in the text part of the control between positions
133 {\it from
} (inclusive) and
{\it to
} (exclusive). This is similar to
134 \helpref{wxTextCtrl::SetSelection
}{wxtextctrlsetselection
}.
136 {\bf NB:
} this is currently only implemented for Windows and generic versions
139 \membersection{wxSpinCtrl::GetMin
}\label{wxspinctrlgetmin
}
141 \constfunc{int
}{GetMin
}{\void}
143 Gets minimal allowable value.
145 \membersection{wxSpinCtrl::GetMax
}\label{wxspinctrlgetmax
}
147 \constfunc{int
}{GetMax
}{\void}
149 Gets maximal allowable value.