*************** wx.CheckListBox *************** Inheritance diagram for `wx.CheckListBox`: | .. inheritance-diagram:: wx.CheckListBox | Description =========== A checklistbox is like a listbox, but allows items to be checked or unchecked. Only the new functions for this class are documented; see also `wx.ListBox `_ . Please note that `wx.CheckListBox` uses client data in its implementation, and therefore this is not available to the application. .. seealso:: `wx.ListBox `_, `wx.Choice `_, `wx.ComboBox `_, `wx.ListCtrl `_, `wx.CommandEvent <../Events/wx.CommandEvent.html>`_ Derived From ^^^^^^^^^^^^^ * `wx.ListBox `_ * `wx.Control `_ * `wx.Window `_ * `wx.EvtHandler `_ * `wx.Object `_ Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_CHECKLISTBOX(id, func) Process a ``wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED`` event, when an item in the check list box is checked or unchecked. ================================================== ================================================== | Control Appearance ^^^^^^^^^^^^^^^^^^ | .. figure:: ../images/wxWidgets/wxmsw/checklistbox.png :alt: wxMSW :figclass: floatleft **wxMSW** .. figure:: ../images/wxWidgets/wxmac/checklistbox.png :alt: wxMAC :figclass: floatright **wxMAC** .. figure:: ../images/wxWidgets/wxgtk/checklistbox.png :alt: wxGTK :figclass: floatcenter **wxGTK** | Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `Check <#Check>`_ * `GetChecked <#GetChecked>`_ * `GetCheckedStrings <#GetCheckedStrings>`_ * `GetItemHeight <#GetItemHeight>`_ * `IsChecked <#IsChecked>`_ * `SetChecked <#SetChecked>`_ * `SetCheckedStrings <#SetCheckedStrings>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `Checked <#Checked>`_ * `CheckedStrings <#CheckedStrings>`_ * `ItemHeight <#ItemHeight>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, choices=[], style=0, validator=wx.DefaultValidator, name=wx.ListBoxNameStr) Constructor. **Parameters:** * `parent` (`wx.Window `_) * `id` (int) * `pos` (`wx.Point `_) * `size` (`wx.Size `_) * `choices` (list of strings) * `style` (long) * `validator` (`wx.Validator `_) * `name` (string) | **Returns:** `wx.CheckListBox `_ -------- .. method:: Check(item, check=True) Checks the given item. Note that calling this method doesn't result in ``wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLE`` being emitted. **Parameters:** * `item` (int): Index of item to check. * `check` (bool): ``True`` if the item is to be checked, ``False`` otherwise. -------- .. method:: GetChecked() Return a tuple of integers corresponding to the checked items in the control, based on `IsChecked <#IsChecked>`_. | **Returns:** `tuple of integers` -------- .. method:: GetCheckedStrings() Return a tuple of strings corresponding to the checked items of the control, based on `GetChecked <#GetChecked>`_. | **Returns:** `tuple of strings` -------- .. method:: GetItemHeight() Returns the item height in `wx.CheckListBox`. | **Returns:** `int` -------- .. method:: IsChecked(index) Returns whether the item at position `index` is checked or not. **Parameters:** * `index` (int): Index of item. | **Returns:** `bool` -------- .. method:: SetChecked(indexes) Sets the checked state of items if the index of the item is found in the indexes sequence. **Parameters:** * `indexes` (list of items) -------- .. method:: SetCheckedStrings(indexes) Sets the checked state of items if the item's string is found in the strings sequence. **Parameters:** * `indexes` (list of strings) -------- Properties ^^^^^^^^^^ .. attribute:: Checked Return a tuple of integers corresponding to the checked items in the control, based on `IsChecked <#IsChecked>`_. .. attribute:: CheckedStrings Return a tuple of strings corresponding to the checked items of the control, based on `GetChecked <#GetChecked>`_. .. attribute:: ItemHeight See `GetItemHeight <#GetItemHeight>`_