wxRuby Documentation Home

Wx::ListItem

This class stores information about a ListCtrl item or column.

Derived from

Object

Methods

ListItem.new

ListItem#clear

clear()

Resets the item state to the default.

ListItem#get_align

ListColumnFormat get_align()

Returns the alignment for this item. Can be one of LIST_FORMAT_LEFT, LIST_FORMAT_RIGHT or LIST_FORMAT_CENTRE.

ListItem#get_background_colour

Colour get_background_colour()

Returns the background colour for this item.

ListItem#get_column

Integer get_column()

Returns the zero-based column; meaningful only in report mode.

ListItem#get_data

Object get_data()

Returns the ruby object set as client data for this item (see set_data, or nil if no such data is set. Please note that client data is associated with the item and not with subitems in columns.

ListItem#get_font

Font get_font()

Returns the font used to display the item.

ListItem#get_id

Integer get_id()

Returns the zero-based item position.

ListItem#get_image

Integer get_image()

Returns the zero-based index of the image associated with the item into the image list.

ListItem#get_mask

Integer get_mask()

Returns a bit mask indicating which fields of the structure are valid; can be any combination of the following values:

LIST_MASK_STATE GetState is valid.
LIST_MASK_TEXT GetText is valid.
LIST_MASK_IMAGE GetImage is valid.
LIST_MASK_DATA GetData is valid.
LIST_MASK_WIDTH GetWidth is valid.
LIST_MASK_FORMAT GetFormat is valid.

ListItem#get_state

Integer get_state()

Returns a bit field representing the state of the item. Can be any combination of:

LIST_STATE_DONTCARE Don’t care what the state is. Win32 only.
LIST_STATE_DROPHILITED The item is highlighted to receive a drop event. Win32 only.
LIST_STATE_FOCUSED The item has the focus.
LIST_STATE_SELECTED The item is selected.
LIST_STATE_CUT The item is in the cut state. Win32 only.

ListItem#get_text

String get_text()

Returns the label/header text.

ListItem#get_text_colour

Colour get_text_colour()

Returns the text colour.

ListItem#get_width

Integer get_width()

Meaningful only for column headers in report mode. Returns the column width.

ListItem#set_align

set_align(ListColumnFormat align)

Sets the alignment for the item. See also ListItem#get_align

ListItem#set_background_colour

set_background_colour(Colour colBack)

Sets the background colour for the item.

ListItem#set_column

set_column(Integer col)

Sets the zero-based column. Meaningful only in report mode.

ListItem#set_data

set_data(Object data)

Sets client data for the item, which can be any arbitrary object. Please note that client data is associated with the item and not with subitem columns..

ListItem#set_font

set_font(Font font)

Sets the font for the item.

ListItem#set_id

set_id(Integer id)

Sets the zero-based item position.

ListItem#set_image

set_image(Integer image)

Sets the zero-based index of the image associated with the item into the image list.

ListItem#set_mask

set_mask(Integer mask)

Sets the mask of valid fields. See ListItem#get_mask.

ListItem#set_state

set_state(Integer state)

Sets the item state flags (note that the valid state flags are influenced by the value of the state mask, see ListItem#set_state_mask). See ListItem#get_state for valid flag values.

ListItem#set_state_mask

set_state_mask(Integer stateMask)

Sets the bitmask that is used to determine which of the state flags are to be set. See also ListItem#set_state.

ListItem#set_text

set_text(String text)

Sets the text label for the item.

ListItem#set_text_colour

set_text_colour(Colour colText)

Sets the text colour for the item.

ListItem#set_width

set_width(Integer width)

Meaningful only for column headers in report mode. Sets the column width.

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