wxCheckListBox(3)
π wxCheckListBox β Erlang Module Definition (section 3) π
okay bestie, gather round, because this one is so good. welcome to wxCheckListBox, Erlang's very own take on the classic wxWidgets checky-list thing. it lives in section 3 of the manual, it's an Erlang module definition, and it's about to make your GUI life 100% cuter.
β¨ NAME β¨
wxCheckListBox β it's giving wxListBox, but with a plot twist: every item can be checked or unchecked. literally that's the whole slay. π
πΈ DESCRIPTION πΈ
so you know how a regular list box just sits there and lists things? yeah. this one lets you tick boxes next to the items. main character energy fr fr. β
β οΈ okay important Windows tea: when you're using this class under Windows, wxWidgets must be compiled withwxUSE_OWNER_DRAWNset to1. no cap. set it or it's not gonna work, and we don't want that for you. π
See also, besties: π
wxListBoxwxChoicewxComboBoxwxListCtrlwxCommandEvent
This class is derived, and can use functions, from: π§¬β¨
wxListBoxwxControlWithItemswxControlwxWindowwxEvtHandler
so yeah, it inherits a whole glow-up from all of those. stacked.
wxWidgets docs: wxCheckListBox
π Events π
Event types emitted from this class, aka the moments it's gonna scream about:
command_checklistbox_toggled
that's the one. that's the moment. π
π¦ DATA TYPES π¦
wxCheckListBox() :: wx:wx_object().
yep, that's it, it's a wx:wx_object() and it's thriving. π«Ά
π FUNCTIONS π
π check
check(This, Item, [Option]) -> ok
when
This :: wxCheckListBox(),
Item :: integer(),
Option :: {check, boolean()}.
Checks the given item. simple as that, bestie. tick it and move on. β
π¨ LOWKEY HUGE HEADS UP: calling this method does not result in a wxEVT_CHECKLISTBOX event being emitted. so don't sit there waiting for the event, because it is simply not coming. π noted and memorised.
π destroy
destroy(This :: wxCheckListBox()) -> ok.
Destroys the object. bye girl, it was iconic, you served well. π π«‘
π isChecked
isChecked(This, Item) -> boolean()
when This :: wxCheckListBox(), Item :: integer().
Returns true if the given item is checked, false otherwise. a little vibe check, but for checkboxes. πβ¨
π new
new() -> wxCheckListBox().
Default constructor. a blank canvas, a fresh start, a new era. π
π new
new(Parent, Id, [Option]) -> wxCheckListBox()
when
Parent :: wxWindow:wxWindow(),
Id :: integer(),
Option ::
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{choices, [unicode:chardata()]} |
{style, integer()} |
{validator, wx:wx_object()}.
Constructor, creating and showing a list box. it builds the thing and it presents the thing. two jobs, both ate. π₯
the options you can slide in there:
{pos, {X :: integer(), Y :: integer()}}β where it chills on screen{size, {W :: integer(), H :: integer()}}β how big it is{choices, [unicode:chardata()]}β the actual list of items, as unicode chardata{style, integer()}β the style bits{validator, wx:wx_object()}β a validator object
okay that's the whole page, bestie, you're officially a wxCheckListBox expert, so go forth and tick boxes with confidence π«Ά no further questions, periodt.
this lil tour was brought to you by Ericsson AB π wx 2.6 π and the one and only wxCheckListBox(3) π stay checky, mwah π
π¦ 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