wxRuby Documentation Home

Wx::CheckListBox

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 ListBox and ControlWithItems. As with other classes that inherit from ControlWithItems, items inside a CheckListBox may have item_data associated with them.

Derived from

ListBox

Control

Window

EvtHandler

Object

Window styles

See ListBox.

Event handling

evt_checklistbox(id) { | event | ... } Process a EVT_COMMAND_CHECKLISTBOX_TOGGLED event,when an item in the check list box is checked or unchecked.

See also

ListBox, Choice, ComboBox, ListCtrl, CommandEvent

Methods

CheckListBox.new

CheckListBox.new(Window parent,  Integer id, 
                 Point pos = DEFAULT_POSITION, 
                 Size size = DEFAULT_SIZE,
                 Array choices = [], 
                 Integer style = 0, 
                 Validator validator = DEFAULT_VALIDATOR, 
                 String name = "listBox")

Constructor, creating and showing a list box.

Parameters

CheckListBox#check

check(Integer item,  Boolean check = true)

Checks the given item. Note that calling this method doesn’t result in EVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted.

Parameters

CheckListBox#is_checked

Array get_checked_items()

Returns an array containing the indices of the items in the controls that are currently checked.

CheckListBox#is_checked

Boolean is_checked(Integer item)

Returns true if the given item is checked, false otherwise.

Parameters

[This page automatically generated from the Textile source at Wed Sep 09 02:21:02 +0100 2009]