wx.CheckListBox

Inheritance diagram for 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.

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


wxMSW

wxMSW

wxMAC

wxMAC

wxGTK

wxGTK


Properties Summary

Class API

Methods

__init__(parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, choices=[], style=0, validator=wx.DefaultValidator, name=wx.ListBoxNameStr)

Constructor.

Parameters:


Returns:

wx.CheckListBox


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.

GetChecked()

Return a tuple of integers corresponding to the checked items in the control, based on IsChecked.


Returns:

tuple of integers


GetCheckedStrings()

Return a tuple of strings corresponding to the checked items of the control, based on GetChecked.


Returns:

tuple of strings


GetItemHeight()

Returns the item height in wx.CheckListBox.


Returns:

int


IsChecked(index)

Returns whether the item at position index is checked or not.

Parameters:

  • index (int): Index of item.

Returns:

bool


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)

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

Checked
Return a tuple of integers corresponding to the checked items in the control, based on IsChecked.
CheckedStrings
Return a tuple of strings corresponding to the checked items of the control, based on GetChecked.
ItemHeight
See GetItemHeight