A CheckListBox is like a ListBox, but allows items to be checked or unchecked.
When using this class under Windows wxWidgets must be compiled with USE_OWNER_DRAWN set to 1.
Handlers bound for the following event types will receive a CommandEvent parameter.
See also
__init__ | Constructor, creating and showing a list box. |
Check | Checks the given item. |
Create | Creates the listbox for two-step construction. |
GetChecked | GetChecked() |
GetCheckedStrings | GetCheckedStrings() |
IsChecked | Returns True if the given item is checked, False otherwise. |
SetChecked | SetChecked(indexes) |
SetCheckedStrings | SetCheckedStrings(strings) |
Checked | See GetChecked and SetChecked |
CheckedStrings | See GetCheckedStrings and SetCheckedStrings |
A CheckListBox is like a ListBox, but allows items to be checked or unchecked.
Possible constructors:
CheckListBox(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
choices=[], style=0, validator=DefaultValidator,
name="listBox")
CheckListBox()
Overloaded Implementations:
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, choices=[], style=0, validator=DefaultValidator, name=”listBox”)
Constructor, creating and showing a list box.
Parameters: |
|
---|
__init__ (self)
Default constructor.
Checks the given item.
Note that calling this method does not result in a wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event being emitted.
Parameters: |
|
---|
Creates the listbox for two-step construction.
See ListBox for further details.
GetChecked()
Return a sequence of integers corresponding to the checked items in the control, based on IsChecked.
GetCheckedStrings()
Return a tuple of strings corresponding to the checked items of the control, based on GetChecked.
Returns True if the given item is checked, False otherwise.
Parameters: | item (int) – Index of item whose check status is to be returned. |
---|---|
Return type: | bool |
SetChecked(indexes)
Sets the checked state of items if the index of the item is found in the indexes sequence.
SetCheckedStrings(strings)
Sets the checked state of items if the item’s string is found in the strings sequence.
See GetChecked and SetChecked
See GetCheckedStrings and SetCheckedStrings