wxCheckBox(3)
π wxCheckBox π
okay bestie, welcome to wxCheckBox, the Erlang module definition for everyone's favourite little box that you click. A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmark). that's it, that's the whole vibe. β
β¨ DESCRIPTION β¨
Optionally (when the wxCHK_3STATE style flag is set) it can have a third state, called the mixed or undetermined state. Often this is used as a "Does Not Apply" state. like, the checkbox is out here having main character energy with three whole states. π
π Styles π
This class supports the following styles:
wxCHK_2STATEβ Create a 2-state checkbox. This is the default. the classic, the icon, the original. πwxCHK_3STATEβ Create a 3-state checkbox. Not implemented in wxGTK1. so if you're on wxGTK1, bestie, this one is not for you πwxCHK_ALLOW_3RD_STATE_FOR_USERβ By default a user can't set a 3-state checkbox to the third state. It can only be done from code. Using this flags allows the user to set the checkbox to the third state by clicking. so like, the user is finally trusted with the third state. slay. π₯wxALIGN_RIGHTβ Makes the text appear on the left of the checkbox. yes, the name says right, the text goes left. it's giving chaos but we love it. π
See:
wxRadioButtonwxCommandEvent
This class is derived, and can use functions, from:
wxControlwxWindowwxEvtHandler
wxWidgets docs: wxCheckBox
π¦ Events π¦
Event types emitted from this class:
command_checkbox_clicked
π DATA TYPES π
wxCheckBox() :: wx:wx_object().
π FUNCTIONS π
create(This, Parent, Id, Label, [Option]) -> boolean()
create(This, Parent, Id, Label, [Option]) -> boolean()
when
This :: wxCheckBox(),
Parent :: wxWindow:wxWindow(),
Id :: integer(),
Label :: unicode:chardata(),
Option ::
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()} |
{validator, wx:wx_object()}.
Creates the checkbox for two-step construction. literally building it in two steps like a little DIY project π οΈβ¨
See new/4 for details.
destroy(This :: wxCheckBox()) -> ok.
Destroys the object. bye bestie, gone, reduced to atoms π
get3StateValue(This) -> wx:wx_enum() when This :: wxCheckBox().
Gets the state of a 3-state checkbox.
Asserts when the function is used with a 2-state checkbox. so do NOT come for this function with a 2-state checkbox, it will be mad π€
getValue(This) -> boolean() when This :: wxCheckBox().
Gets the state of a 2-state checkbox.
Return: Returns true if it is checked, false otherwise. simple. clean. iconic. β¨
is3State(This) -> boolean() when This :: wxCheckBox().
Returns whether or not the checkbox is a 3-state checkbox.
Return: true if this checkbox is a 3-state checkbox, false if it's a 2-state checkbox. a little vibe check on your checkbox π«Ά
is3rdStateAllowedForUser(This) -> boolean() when This :: wxCheckBox().
Returns whether or not the user can set the checkbox to the third state.
Return: true if the user can set the third state of this checkbox, false if it can only be set programmatically or if it's a 2-state checkbox. is the user allowed to touch the third state? only this function knows π
isChecked(This) -> boolean() when This :: wxCheckBox().
This is just a maybe more readable synonym for getValue/1: just as the latter, it returns true if the checkbox is checked and false otherwise. same thing, cuter name, no cap. π
new() -> wxCheckBox().
Default constructor. the blank slate, the fresh start, the checklist not yet checked πΈ
See: create/5
new(Parent, Id, Label, [Option]) -> wxCheckBox()
new(Parent, Id, Label, [Option]) -> wxCheckBox()
when
Parent :: wxWindow:wxWindow(),
Id :: integer(),
Label :: unicode:chardata(),
Option ::
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()} |
{validator, wx:wx_object()}.
Constructor, creating and showing a checkbox. creates it AND shows it, one step, no crumbs left behind π₯
See: create/5
set3StateValue(This, State) -> ok
set3StateValue(This, State) -> ok
when This :: wxCheckBox(), State ::
wx:wx_enum().
Sets the checkbox to the given state.
This does not cause a wxEVT_CHECKBOX event to get emitted. so don't sit there waiting for an event that is never coming, bestie π
Asserts when the checkbox is a 2-state checkbox and setting the state to wxCHK_UNDETERMINED. yeah it will absolutely throw hands over this one.
setValue(This, State) -> ok
setValue(This, State) -> ok
when This :: wxCheckBox(), State :: boolean().
Sets the checkbox to the given state.
This does not cause a wxEVT_CHECKBOX event to get emitted. same deal, no event, don't @ me π
and that's the whole page, periodt. π this lil beauty ships with Ericsson AB, version wx 2.6, and it's out here doing its thing under the wxCheckBox(3) name. stan a checkbox that simply works. πβ¨π
π¦ 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