wxRuby Documentation Home

Wx::ListView

This class currently simply presents a simpler to use interface for the ListCtrl—it can be thought of as a facade for that complicated class. Using it is preferable to using ListCtrl directly whenever possible because in the future some ports might implement ListView but not the full set of ListCtrl features.

Other than different interface, this class is identical to ListCtrl. In particular, it uses the same events, same windows styles and so on.

Derived from

ListCtrl

Control

Window

EvtHandler

Object

Methods

ListView#clear_column_image

clear_column_image(Integer col)

Resets the column image—after calling this function, no image will be shown.

Parameters

See also

set_column_image

ListView#focus

focus(Integer index)

Sets focus to the item with the given index.

ListView#get_first_selected

Integer get_first_selected()

Returns the first selected item in a (presumably) multiple selection control. Tigether with get_next_selected it can be used to iterate over all selected items in the control.

Return value

The fisrt selected item, if any, $-1$ otherwise.

ListView#get_focused_item

Integer get_focused_item()

Returns the currently focused item or $-1$ if none.

See also

is_selected,

Focus

ListView#get_next_selected

Integer get_next_selected(Integer item)

Used together with get_first_selected to iterate over all selected items in the control.

Return value

Returns the next selected item or $-1$ if there are no more of them.

ListView#is_selected

Boolean is_selected(Integer index)

Returns true if the item with the given index is selected, false otherwise.

See also

get_first_selected,

get_next_selected

ListView#select

select(long n,  Boolean on = true)

Selects or unselects the given item.

Parameters

See also

set_item_state

ListView#set_column_image

set_column_image(Integer col,  Integer image)

Sets the column image for the specified column. To use the column images, the control must have a valid image list with at least one image.

Parameters

See also

clear_column_image,

set_image_list

[This page automatically generated from the Textile source at Thu May 01 00:50:40 +0100 2008]