wxChoice(3)
π NAME π
wxChoice β a choice item is used to select one of a list of strings. bestie it's literally a dropdown, go off π
β¨ DESCRIPTION β¨
Okay so picture a wxListBox but make it mysterious. Unlike a wxListBox, only the selection is visible until the user pulls down the menu of choices. it's giving β¨mysteriousβ¨, it's giving "you'll see me when i want you to see me" π
π Styles
This class supports the following styles:
wxCB_SORTβ sorts the entries alphabetically. alphabetize her, she deserves it π€β¨
See:
wxListBoxwxComboBoxwxCommandEvent
This class is derived, and can use functions, from:
wxControlWithItemswxControlwxWindowwxEvtHandler
wxWidgets docs: wxChoice
not her having a whole ancestral lineage π four classes deep and still slaying, we love generational talent π
π¦ Events
Event types emitted from this class:
command_choice_selected
like she's literally screaming at you when someone picks something, iconic behavior fr fr π£
π DATA TYPES π
wxChoice() :: wx:wx_object().
that's it. that's the whole type. simple. clean. main character energy π
π«Ά FUNCTIONS π«Ά
πΈ create(This, Parent, Id, Pos, Size, Choices, [Option]) -> boolean()
create(This, Parent, Id, Pos, Size, Choices, [Option]) ->
boolean()
when
This :: wxChoice(),
Parent :: wxWindow:wxWindow(),
Id :: integer(),
Pos :: {X :: integer(), Y :: integer()},
Size :: {W :: integer(), H :: integer()},
Choices :: [unicode:chardata()],
Option ::
{style, integer()} | {validator, wx:wx_object()}.
it makes the thing, bestie. it returns a boolean and we're not asking questions β¨
πΈ delete(This, N) -> ok
delete(This, N) -> ok when This :: wxChoice(), N :: integer().
Deletes an item from the control. bye girl, we hardly knew ye ππ
The client data associated with the item will be also deleted if it is owned by the control. Note that it is an error (signalled by an assert failure in debug builds) to remove an item with the index negative or greater or equal than the number of items in the control.
π¨ okay real talk, do not come at her with a negative index or an index >= the number of items. she WILL assert-fail in debug builds and it will be embarrassing for everyone π
If there is a currently selected item below the item being deleted, i.e. if wxControlWithItems:getSelection/1 returns a valid index greater than or equal to n, the selection is invalidated when this function is called. However if the selected item appears before the item being deleted, the selection is preserved unchanged.
so like. selection above the deletion = safe and sound π«Ά. selection below = she's gone, invalidated, no notes π
See: wxControlWithItems:clear/1
πΈ destroy(This :: wxChoice()) -> ok
destroy(This :: wxChoice()) -> ok.
Destroys the object. rip boo you would've loved the dropdown menu πποΈ
πΈ getColumns(This) -> integer()
getColumns(This) -> integer() when This :: wxChoice().
Gets the number of columns in this choice item.
Remark: This is implemented for GTK and Motif only and always returns 1 for the other platforms. so on everything else she's just gonna hand you a 1 and act like that's normal π ngl that's so real of her
πΈ new() -> wxChoice()
new() -> wxChoice().
Default constructor. bare. minimal. a whole vibe πΈ
See: create/7
πΈ new(Parent, Id, [Option]) -> wxChoice()
new(Parent, Id, [Option]) -> wxChoice()
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 choice. yes she does both, she's a multitasker, obsessed π β¨
See: create/7
πΈ setColumns(This, [Option]) -> ok
setColumns(This, [Option]) -> ok
when This :: wxChoice(), Option :: {n, integer()}.
Sets the number of columns in this choice item. get you a girl who can do both π
Remark: This is implemented for GTK and Motif only and doesnβt do anything under other platforms. like literally nothing. she's just standing there. π§βοΈπ
and that's the whole page bestie, you ate that πβ¨ππ¦πΈ
out here repping Ericsson AB, riding with wx 2.6 β periodt, no cap, and that's the wxChoice(3) tea ππ π
π¦ 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