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.
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.
13 \wxheading{Derived from
}
15 \helpref{wxControl
}{wxcontrol
}\\
16 \helpref{wxWindow
}{wxwindow
}\\
17 \helpref{wxEvtHandler
}{wxevthandler
}\\
18 \helpref{wxObject
}{wxobject
}
22 \helpref{wxSpinCtrl
}{wxspinctrl
}
24 \wxheading{Include files
}
28 \wxheading{Window styles
}
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.
}
38 See also
\helpref{window styles overview
}{windowstyles
}.
44 \helpref{Event handling overview
}{eventhandlingoverview
}
46 \latexignore{\rtfignore{\wxheading{Members
}}}
48 \membersection{wxSpinButton::wxSpinButton
}\label{wxspinbuttonctor
}
50 \func{}{wxSpinButton
}{\void}
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},
\rtfsp
57 \param{const wxString\&
}{name = ``spinButton"
}}
59 Constructor, creating and showing a spin button.
61 \wxheading{Parameters
}
63 \docparam{parent
}{Parent window. Must not be NULL.
}
65 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
67 \docparam{pos
}{Window position. If the position (-
1, -
1) is specified then a default position is chosen.
}
69 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then a default size is chosen.
}
71 \docparam{style
}{Window style. See
\helpref{wxSpinButton
}{wxspinbutton
}.
}
73 \docparam{name
}{Window name.
}
77 \helpref{wxSpinButton::Create
}{wxspinbuttoncreate
}
79 \membersection{wxSpinButton::
\destruct{wxSpinButton
}}\label{wxspinbuttondtor
}
81 \func{void
}{\destruct{wxSpinButton
}}{\void}
83 Destructor, destroys the spin button control.
85 \membersection{wxSpinButton::Create
}\label{wxspinbuttoncreate
}
87 \func{bool
}{Create
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{id
},
\rtfsp
88 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
\rtfsp
89 \param{long
}{ style = wxSP
\_HORIZONTAL},
\rtfsp
90 \param{const wxString\&
}{name = ``spinButton"
}}
92 Scrollbar creation function called by the spin button constructor.
93 See
\helpref{wxSpinButton::wxSpinButton
}{wxspinbuttonctor
} for details.
95 \membersection{wxSpinButton::GetMax
}\label{wxspinbuttongetmax
}
97 \constfunc{int
}{GetMax
}{\void}
99 Returns the maximum permissible value.
103 \helpref{wxSpinButton::SetRange
}{wxspinbuttonsetrange
}
105 \membersection{wxSpinButton::GetMin
}\label{wxspinbuttongetmin
}
107 \constfunc{int
}{GetMin
}{\void}
109 Returns the minimum permissible value.
113 \helpref{wxSpinButton::SetRange
}{wxspinbuttonsetrange
}
115 \membersection{wxSpinButton::GetValue
}\label{wxspinbuttongetvalue
}
117 \constfunc{int
}{GetValue
}{\void}
119 Returns the current spin button value.
123 \helpref{wxSpinButton::SetValue
}{wxspinbuttonsetvalue
}
125 \membersection{wxSpinButton::SetRange
}\label{wxspinbuttonsetrange
}
127 \func{void
}{SetRange
}{\param{int
}{ min
},
\param{int
}{ max
}}
129 Sets the range of the spin button.
131 \wxheading{Parameters
}
133 \docparam{min
}{The minimum value for the spin button.
}
135 \docparam{max
}{The maximum value for the spin button.
}
139 \helpref{wxSpinButton::GetMin
}{wxspinbuttongetmin
},
\helpref{wxSpinButton::GetMax
}{wxspinbuttongetmax
}
141 \membersection{wxSpinButton::SetValue
}\label{wxspinbuttonsetvalue
}
143 \func{void
}{SetValue
}{\param{int
}{ value
}}
145 Sets the value of the spin button.
147 \wxheading{Parameters
}
149 \docparam{value
}{The value for the spin button.
}
153 \helpref{wxSpinButton::GetValue
}{wxspinbuttongetvalue
}