wxSpinButton(3erl)
π wxSpinButton(3erl) β Erlang Module Definition π
okay so bestie, this is the Erlang module definition for wxSpinButton(3erl) β the little spinny control thatβs lowkey everywhere once you notice it. Letβs get into it. β¨
πΈ NAME πΈ
wxSpinButton β Functions for wxSpinButton class. Thatβs the whole vibe: itβs the function crew for the spin button class. π«Ά
π DESCRIPTION π
A wxSpinButton has two small up and down (or left and right) arrow buttons. Tiny arrows, big main-character energy. π¦
It is often used next to a text control for increment and decrementing a value. Very βsidekick that makes the whole UI workβ of it. π
Portable programs should try to use wxSpinCtrl instead as wxSpinButton is not implemented for all platforms but wxSpinCtrl is as it degenerates to a simple wxTextCtrl on such platforms. So like, if portability is the goal, wxSpinCtrl is the safer bestie. No cap.
Note: the range supported by this control (andwxSpinCtrl) depends on the platform but is at least-0x8000to0x7fff. Under GTK and Win32 with sufficiently new version ofcomctrl32.dll(at least4.71is required,5.80is recommended) the full 32 bit range is supported. Platform range behavior is a whole thing, so keep that in mind. π
π Styles π
This class supports the following styles:
See: wxSpinCtrl
This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler
wxWidgets docs: wxSpinButton
π₯ EVENTS π₯
Event types emitted from this class: spin, spin_up, spin_down. Three little event icons, slay. β¨
π¦ DATA TYPES π¦
wxSpinButton() = wx:wx_object()
π EXPORTS π
β¨ new() -> wxSpinButton()
Default constructor. No parent, no options β just a fresh little spin button being born. Iconic. π
β¨ new(Parent) -> wxSpinButton()
Types:
Parent = wxWindow:wxWindow()
β¨ new(Parent, Options :: [Option]) -> wxSpinButton()
Types:
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
β¨ destroy(This :: wxSpinButton()) -> ok
Destructor, destroys the spin button control. Itβs the goodbye era. π
β¨ create(This, Parent) -> boolean()
Types:
This = wxSpinButton()
Parent = wxWindow:wxWindow()
β¨ create(This, Parent, Options :: [Option]) -> boolean()
Types:
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.
β¨ getMax(This) -> integer()
Types:
This = wxSpinButton()
Returns the maximum permissible value.
See: setRange/3
β¨ getMin(This) -> integer()
Types:
This = wxSpinButton()
Returns the minimum permissible value.
See: setRange/3
β¨ getValue(This) -> integer()
Types:
This = wxSpinButton()
Returns the current spin button value.
See: setValue/2
β¨ setRange(This, Min, Max) -> ok
Types:
This = wxSpinButton()
Min = 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. So yeah, that reversed-minmax thing is a wxMSW-only dubious feature β do with that info what you will. π
See: getMin/1, getMax/1
β¨ setValue(This, Value) -> ok
Types:
This = wxSpinButton()
Value = integer()
Sets the value of the spin button.
Later, bestie π β cute sign-off from the footer: source/version/page info iswxWidgets team.,wx 2.2.2.1, andwxSpinButton(3erl). Mwah! π«Ά
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms