GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.CheckListBox
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.CheckListBox — wxPython 4.3.2 Docs

phoenix_title wx.CheckListBox¶

A wx.CheckListBox is like a wx.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.

events Events Emitted by this Class¶

Handlers bound for the following event types will receive a wx.CommandEvent parameter.

  • EVT_CHECKLISTBOX: Process a wxEVT_CHECKLISTBOX event, when an item in the check list box is checked or unchecked. wx.CommandEvent.GetInt will contain the index of the item that was checked or unchecked. wx.CommandEvent.IsChecked is not valid! Use wx.CheckListBox.IsChecked instead.

See also

wx.ListBox, wx.Choice, wx.ComboBox, wx.ListCtrl, wx.CommandEvent


class_hierarchy Class Hierarchy¶

Inheritance diagram for class CheckListBox:

Inheritance diagram of CheckListBox


appearance Control Appearance¶


wxMSW

wxMSW¶

wxGTK

wxGTK¶

wxMAC

wxMAC¶


sub_classes Known Subclasses¶

wx.RearrangeList


method_summary Methods Summary¶

__init__

Constructor, creating and showing a list box.

Check

Checks the given item.

Create

GetCheckedItems

GetCheckedItems()

GetCheckedStrings

GetCheckedStrings()

GetClassDefaultAttributes

GetSelections

Returns a list of the indices of the currently selected items.

IsChecked

Returns True if the given item is checked, False otherwise.

SetCheckedItems

SetCheckedItems(indexes)

SetCheckedStrings

SetCheckedStrings(strings)


property_summary Properties Summary¶

Checked

See GetChecked and SetChecked

CheckedItems

See GetCheckedItems and SetCheckedItems

CheckedStrings

See GetCheckedStrings and SetCheckedStrings


api Class API¶

class wx.CheckListBox(ListBox)¶

Possible constructors:

CheckListBox(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
             choices=[], style=0, validator=DefaultValidator, name="listBox") -> None

CheckListBox() -> None

A CheckListBox is like a ListBox, but allows items to be checked or unchecked.


Methods¶

__init__(self, *args, **kw)¶

overload 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:
  • parent (wx.Window) – Parent window. Must not be nullptr.

  • id (wx.WindowID) – Window identifier. The value wx.ID_ANY indicates a default value.

  • pos (wx.Point) – Window position.

  • size (wx.Size) – Window size. If DefaultSize is specified then the window is sized appropriately.

  • choices (list of strings) – An array of strings with which to initialise the control.

  • style (long) – Window style. See wx.CheckListBox.

  • validator (wx.Validator) – Window validator.

  • name (string) – Window name.

Return type:

None



__init__ (self)

Default constructor.

Return type:

None





Check(self, item, check=True)¶

Checks the given item.

Note that calling this method does not result in a wxEVT_CHECKLISTBOX event being emitted.

Parameters:
  • item (int) – Index of item to check.

  • check (bool) – True if the item is to be checked, False otherwise.

Return type:

None



Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, choices=[], style=0, validator=DefaultValidator, name=ListBoxNameStr)¶
Parameters:
  • parent (wx.Window)

  • id (wx.WindowID)

  • pos (wx.Point)

  • size (wx.Size)

  • choices (list of strings)

  • style (long)

  • validator (wx.Validator)

  • name (string)

Return type:

bool



GetCheckedItems(self)¶

GetCheckedItems()

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



GetCheckedStrings(self)¶

GetCheckedStrings()

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



static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)¶
Parameters:

variant (WindowVariant)

Return type:

wx.VisualAttributes



GetSelections(self)¶

Returns a list of the indices of the currently selected items.

Return type:

List[int]



IsChecked(self, item)¶

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



SetCheckedItems(self, indexes)¶

SetCheckedItems(indexes)

Sets the checked state of items if the index of the item is found in the indexes sequence.



SetCheckedStrings(self, strings)¶

SetCheckedStrings(strings)

Sets the checked state of items if the item’s string is found in the strings sequence.


Properties¶

Checked¶

See GetChecked and SetChecked



CheckedItems¶

See GetCheckedItems and SetCheckedItems



CheckedStrings¶

See GetCheckedStrings and SetCheckedStrings

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.