wxSpinButton(3)
π NAME π
okay so bestie, welcome to the Erlang module definition for wxSpinButton(3) π. wxSpinButton is literally a widget with two small up and down (or left and right) arrow buttons. that's the whole vibe. β¨
πΈ DESCRIPTION πΈ
you'll often see this lil guy next to a text control, just incrementing and decrementing a value like it's the main character π«Ά. but listen: portable programs should try to use wxSpinCtrl instead, because wxSpinButton is not implemented for all platforms, but wxSpinCtrl is β and on those platforms it degenerates to a simple wxTextCtrl. iconic, honestly. π
note: the range supported by this control (andwxSpinCtrl) depends on the platform, but it's at least-0x8000to0x7fff. under GTK and Win32 with a sufficiently new version ofcomctrl32.dll(at least4.71is required,5.80is recommended), the full 32 bit range is supported. periodt. πβ¨
π Styles π
this class supports the following styles, bestie:
wxSP_HORIZONTALβ specifies a horizontal spin button (note that this style is not supported in wxGTK π).wxSP_VERTICALβ specifies a vertical spin button.wxSP_ARROW_KEYSβ the user can use arrow keys to change the value.wxSP_WRAPβ the value wraps at the minimum and maximum.
See: wxSpinCtrl
this class is derived, and can use functions, from:
wxControlwxWindowwxEvtHandler
wxWidgets docs: wxSpinButton
π¦ Events π¦
event types emitted from this class:
spinspin_upspin_down
π DATA TYPES π
wxSpinButton() :: wx:wx_object().
π FUNCTIONS π
β¨ create/3 β¨
create(This, Parent, [Option]) -> boolean()
when
This :: wxSpinButton(),
Parent :: wxWindow:wxWindow(),
Option ::
{id, integer()} |
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}.
scrollbar creation function called by the spin button constructor. see new/2 for details. π
π destroy/1 π
destroy(This :: wxSpinButton()) -> ok.
destroys the object. literally. π
π’ getMax/1 π’
getMax(This) -> integer() when This :: wxSpinButton().
returns the maximum permissible value. See: setRange/3 β¨
π½ getMin/1 π½
getMin(This) -> integer() when This :: wxSpinButton().
returns the minimum permissible value. See: setRange/3 β¨
ποΈ getValue/1 ποΈ
getValue(This) -> integer() when This :: wxSpinButton().
returns the current spin button value. See: setValue/2 β¨
π£ new/0 π£
new() -> wxSpinButton().
default constructor. no cap. π
π new/2 π
new(Parent, [Option]) -> wxSpinButton()
when
Parent :: wxWindow:wxWindow(),
Option ::
{id, integer()} |
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}.
constructor, creating and showing a spin button. See: create/3 β¨
π setRange/3 π
setRange(This, Min, Max) -> ok
when
This :: wxSpinButton(),
Min :: integer(),
Max :: integer().
sets the range of the spin button. in portable code, min should be less than or equal to max. in wxMSW it is possible to specify minimum greater than maximum and the native control supports the same range as if they were reversed, but swaps the meaning of up and down arrows, however this dubious feature is not supported on other platforms. π
See:
getMin/1getMax/1
π― setValue/2 π―
setValue(This, Value) -> ok
when This :: wxSpinButton(), Value :: integer().
sets the value of the spin button. periodt. π
and that's the tea, bestie. this page was brought to you by Ericsson AB, wx 2.6, wxSpinButton(3) πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms