back to gui
wxCheckBox
generated from ../src/mod_gui/control/checkbox.cpp
A checkbox is a labeled box which is either on
(checkmark is visible) or off (no checkmark).
An example:
// dlg is a wxDialog
var chkbox = new wxCheckBox(dlg, -1, "Check me");
chkbox.onCheckBox = function(event)
{
if ( event.checked )
wxMessageBox("Checked");
else
wxMessageBox("Unchecked");
}
Constants
Constructor
wxCheckBox
wxCheckBox()
wxCheckBox(Parent,
Id,
Text,
Pos = wxDefaultPosition,
Size = wxDefaultSize,
Style = 0,
Validator = null)
| Name |
Type |
Default |
Description |
| Parent |
wxWindow |
|
The parent of the checkbox |
| Id |
Integer |
|
A window identifier. Use -1 when you don't need it |
| Text |
String |
|
The label of the checkbox |
| Pos |
wxPoint |
wxDefaultPosition |
The position of the checkbox on the given parent |
| Size |
wxSize |
wxDefaultSize |
The size of the checkbox |
| Style |
Integer |
0 |
The style of the checkbox |
| Validator |
wxValidator |
null |
A validator |
Constructs a new wxCheckBox object.
Properties
| Name |
Type |
Description |
| value |
Boolean |
Checks/Unchecks the checkbox.
|
Methods
create
create(Parent,
Id,
Text,
Pos = wxDefaultPosition,
Size = wxDefaultSize,
Style = 0,
Validator = null) : Boolean
| Name |
Type |
Default |
Description |
| Parent |
wxWindow |
|
The parent of the checkbox |
| Id |
Integer |
|
A window identifier. Use -1 when you don't need it
|
| Text |
String |
|
The label of the checkbox
|
| Pos |
wxPoint |
wxDefaultPosition |
The position of the checkbox on the given parent.
|
| Size |
wxSize |
wxDefaultSize |
The size of the checkbox
|
| Style |
Integer |
0 |
The style of the checkbox
|
| Validator |
wxValidator |
null |
A validator |
Constructs a new wxCheckBox object.
Events
| onCheckBox |
Called when the checkbox is clicked. The type of the argument that your
handler receives is wxCommandEvent.
|