wxCheckListBox(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– 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 with wxUSE_OWNER_DRAWN set to 1. no cap. set it or it's not gonna work, and we don't want that for you. 😭

See also, besties: πŸ‘€

  • wxListBox
  • wxChoice
  • wxComboBox
  • wxListCtrl
  • wxCommandEvent

This class is derived, and can use functions, from: 🧬✨

  • wxListBox
  • wxControlWithItems
  • wxControl
  • wxWindow
  • wxEvtHandler

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