1wxChoice(3) Erlang Module Definition wxChoice(3)
2
3
4
6 wxChoice - Functions for wxChoice class
7
9 A choice item is used to select one of a list of strings. Unlike a
10 wxListBox, only the selection is visible until the user pulls down the
11 menu of choices.
12
13 Styles
14
15 This class supports the following styles:
16
17 See: wxListBox, wxComboBox, wxCommandEvent
18
19 This class is derived (and can use functions) from: wxControlWithItems
20 wxControl wxWindow wxEvtHandler
21
22 wxWidgets docs: wxChoice
23
25 Event types emitted from this class: command_choice_selected
26
28 wxChoice() = wx:wx_object()
29
31 new() -> wxChoice()
32
33 Default constructor.
34
35 See: create/7, wxValidator (not implemented in wx)
36
37 new(Parent, Id) -> wxChoice()
38
39 Types:
40
41 Parent = wxWindow:wxWindow()
42 Id = integer()
43
44 new(Parent, Id, Options :: [Option]) -> wxChoice()
45
46 Types:
47
48 Parent = wxWindow:wxWindow()
49 Id = integer()
50 Option =
51 {pos, {X :: integer(), Y :: integer()}} |
52 {size, {W :: integer(), H :: integer()}} |
53 {choices, [unicode:chardata()]} |
54 {style, integer()} |
55 {validator, wx:wx_object()}
56
57 Constructor, creating and showing a choice.
58
59 See: create/7, wxValidator (not implemented in wx)
60
61 destroy(This :: wxChoice()) -> ok
62
63 Destructor, destroying the choice item.
64
65 create(This, Parent, Id, Pos, Size, Choices) -> boolean()
66
67 Types:
68
69 This = wxChoice()
70 Parent = wxWindow:wxWindow()
71 Id = integer()
72 Pos = {X :: integer(), Y :: integer()}
73 Size = {W :: integer(), H :: integer()}
74 Choices = [unicode:chardata()]
75
76 create(This, Parent, Id, Pos, Size, Choices, Options :: [Option]) ->
77 boolean()
78
79 Types:
80
81 This = wxChoice()
82 Parent = wxWindow:wxWindow()
83 Id = integer()
84 Pos = {X :: integer(), Y :: integer()}
85 Size = {W :: integer(), H :: integer()}
86 Choices = [unicode:chardata()]
87 Option = {style, integer()} | {validator, wx:wx_object()}
88
89 delete(This, N) -> ok
90
91 Types:
92
93 This = wxChoice()
94 N = integer()
95
96 Deletes an item from the control.
97
98 The client data associated with the item will be also deleted if
99 it is owned by the control. Note that it is an error (signalled
100 by an assert failure in debug builds) to remove an item with the
101 index negative or greater or equal than the number of items in
102 the control.
103
104 If there is a currently selected item below the item being
105 deleted, i.e. if wxControlWithItems:getSelection/1 returns a
106 valid index greater than or equal to n, the selection is invali‐
107 dated when this function is called. However if the selected item
108 appears before the item being deleted, the selection is pre‐
109 served unchanged.
110
111 See: wxControlWithItems:clear/1
112
113 getColumns(This) -> integer()
114
115 Types:
116
117 This = wxChoice()
118
119 Gets the number of columns in this choice item.
120
121 Remark: This is implemented for GTK and Motif only and always
122 returns 1 for the other platforms.
123
124 setColumns(This) -> ok
125
126 Types:
127
128 This = wxChoice()
129
130 setColumns(This, Options :: [Option]) -> ok
131
132 Types:
133
134 This = wxChoice()
135 Option = {n, integer()}
136
137 Sets the number of columns in this choice item.
138
139 Remark: This is implemented for GTK and Motif only and doesn’t
140 do anything under other platforms.
141
142
143
144wxWidgets team. wx 2.1 wxChoice(3)