wxSingleChoiceDialog(3erl)

πŸŽ€ NAME πŸŽ€

okay bestie, this is wxSingleChoiceDialog(3erl) β€” the Erlang Module Definition page, and it’s giving β€œdialog for picking exactly one thing” energy ✨

wxSingleChoiceDialog β€” Functions for wxSingleChoiceDialog class πŸ’–


🌸 DESCRIPTION 🌸

okay so this class represents a dialog that shows a list of strings and lets the user select one. no cap, that’s the main-character job πŸ’…. Double-clicking on a list item is equivalent to single-clicking and then pressing OK β€” literally the same outcome, bestie.

🌈 Styles 🌈

The page says: This class supports the following styles: β€” and then… the list is empty on this page, bestie 🫠. That’s the vibe the original is serving.

See: Overview cmndlg, wxMultiChoiceDialog πŸ¦‹

This class is derived (and can use functions) from: wxDialog wxTopLevelWindow wxWindow wxEvtHandler πŸ‘‘

wxWidgets docs: wxSingleChoiceDialog πŸ“š


🧚 DATA TYPES 🧚

wxSingleChoiceDialog() = wx:wx_object()

πŸ’… EXPORTS πŸ’…

new(Parent, Message, Caption, Choices) -> wxSingleChoiceDialog()

new(Parent, Message, Caption, Choices) -> wxSingleChoiceDialog()

Types:

Parent = wxWindow:wxWindow()
Message = Caption = unicode:chardata()
Choices = [unicode:chardata()]

new(Parent, Message, Caption, Choices, Options :: [Option]) -> wxSingleChoiceDialog()

new(Parent, Message, Caption, Choices, Options :: [Option]) ->
       wxSingleChoiceDialog()

Types:

Parent = wxWindow:wxWindow()
Message = Caption = unicode:chardata()
Choices = [unicode:chardata()]
Option =
    {style, integer()} | {pos, {X :: integer(), Y ::
integer()}}

Constructor, taking an array of wxString (not implemented in wx) choices and optional client data. yes, the docs literally say β€œ(not implemented in wx)” β€” don’t shoot the messenger 😭

Remark: Use wxDialog:showModal/1 to show the dialog. that’s the official move, bestie 🫢

getSelection(This) -> integer()

getSelection(This) -> integer()

Types:

This = wxSingleChoiceDialog()

Returns the index of selected item πŸ”₯

getStringSelection(This) -> unicode:charlist()

getStringSelection(This) -> unicode:charlist()

Types:

This = wxSingleChoiceDialog()

Returns the selected string πŸŽ€

setSelection(This, Selection) -> ok

setSelection(This, Selection) -> ok

Types:

This = wxSingleChoiceDialog()
Selection = integer()

Sets the index of the initially selected item ✨

destroy(This :: wxSingleChoiceDialog()) -> ok

destroy(This :: wxSingleChoiceDialog()) -> ok

Destroys the object πŸ’€ β€” but, like, the normal object-destroying way, not drama.


okay that’s the whole page, bestie! source/version sign-off: wxWidgets team., wx 2.2.2.1, and the page tag wxSingleChoiceDialog(3erl) β€” that’s the footer vibe, no separate date in this one πŸŽ€βœ¨

πŸ“¦ where this page comes from