1wxToggleButton(3) Erlang Module Definition wxToggleButton(3)
2
3
4
6 wxToggleButton - Functions for wxToggleButton class
7
9 wxToggleButton is a button that stays pressed when clicked by the user.
10 In other words, it is similar to wxCheckBox in functionality but looks
11 like a wxButton.
12
13 Since wxWidgets version 2.9.0 this control emits an update UI event.
14
15 You can see wxToggleButton in action in page_samples_widgets.
16
17 See: wxCheckBox, wxButton, wxBitmapToggleButton (not implemented in wx)
18
19 This class is derived (and can use functions) from: wxControl wxWindow
20 wxEvtHandler
21
22 wxWidgets docs: wxToggleButton
23
25 Event types emitted from this class: command_togglebutton_clicked
26
28 wxToggleButton() = wx:wx_object()
29
31 new() -> wxToggleButton()
32
33 Default constructor.
34
35 new(Parent, Id, Label) -> wxToggleButton()
36
37 Types:
38
39 Parent = wxWindow:wxWindow()
40 Id = integer()
41 Label = unicode:chardata()
42
43 new(Parent, Id, Label, Options :: [Option]) -> wxToggleButton()
44
45 Types:
46
47 Parent = wxWindow:wxWindow()
48 Id = integer()
49 Label = unicode:chardata()
50 Option =
51 {pos, {X :: integer(), Y :: integer()}} |
52 {size, {W :: integer(), H :: integer()}} |
53 {style, integer()} |
54 {validator, wx:wx_object()}
55
56 Constructor, creating and showing a toggle button.
57
58 See: create/5, wxValidator (not implemented in wx)
59
60 destroy(This :: wxToggleButton()) -> ok
61
62 Destructor, destroying the toggle button.
63
64 create(This, Parent, Id, Label) -> boolean()
65
66 Types:
67
68 This = wxToggleButton()
69 Parent = wxWindow:wxWindow()
70 Id = integer()
71 Label = unicode:chardata()
72
73 create(This, Parent, Id, Label, Options :: [Option]) -> boolean()
74
75 Types:
76
77 This = wxToggleButton()
78 Parent = wxWindow:wxWindow()
79 Id = integer()
80 Label = unicode:chardata()
81 Option =
82 {pos, {X :: integer(), Y :: integer()}} |
83 {size, {W :: integer(), H :: integer()}} |
84 {style, integer()} |
85 {validator, wx:wx_object()}
86
87 Creates the toggle button for two-step construction.
88
89 See new/4 for details.
90
91 getValue(This) -> boolean()
92
93 Types:
94
95 This = wxToggleButton()
96
97 Gets the state of the toggle button.
98
99 Return: Returns true if it is pressed, false otherwise.
100
101 setValue(This, State) -> ok
102
103 Types:
104
105 This = wxToggleButton()
106 State = boolean()
107
108 Sets the toggle button to the given state.
109
110 This does not cause a EVT_TOGGLEBUTTON event to be emitted.
111
112
113
114wxWidgets team. wx 2.1 wxToggleButton(3)