View Source wxSingleChoiceDialog (wx v2.4.2)

Functions for wxSingleChoiceDialog class

This class represents a dialog that shows a list of strings, and allows the user to select one. Double-clicking on a list item is equivalent to single-clicking and then pressing OK.

Styles

This class supports the following styles:

See: Overview cmndlg, wxMultiChoiceDialog

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

wxWidgets docs: wxSingleChoiceDialog

Summary

Functions

Destroys the object.

Returns the index of selected item.

Returns the selected string.

Constructor, taking an array of wxString (not implemented in wx) choices and optional client data.

Sets the index of the initially selected item.

Types

Link to this type

wxSingleChoiceDialog()

View Source
-type wxSingleChoiceDialog() :: wx:wx_object().

Functions

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

Destroys the object.

-spec getSelection(This) -> integer() when This :: wxSingleChoiceDialog().

Returns the index of selected item.

Link to this function

getStringSelection(This)

View Source
-spec getStringSelection(This) -> unicode:charlist() when This :: wxSingleChoiceDialog().

Returns the selected string.

Link to this function

new(Parent, Message, Caption, Choices)

View Source
-spec new(Parent, Message, Caption, Choices) -> wxSingleChoiceDialog()
             when
                 Parent :: wxWindow:wxWindow(),
                 Message :: unicode:chardata(),
                 Caption :: unicode:chardata(),
                 Choices :: [unicode:chardata()].
-spec new(Parent, Message, Caption, Choices, [Option]) -> wxSingleChoiceDialog()
             when
                 Parent :: wxWindow:wxWindow(),
                 Message :: unicode:chardata(),
                 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.

Remark: Use wxDialog:showModal/1 to show the dialog.

Link to this function

setSelection(This, Selection)

View Source
-spec setSelection(This, Selection) -> ok when This :: wxSingleChoiceDialog(), Selection :: integer().

Sets the index of the initially selected item.