View Source wxListItem (wx v2.4.2)

Functions for wxListItem class

This class stores information about a wxListCtrl item or column.

wxListItem is a class which contains information about:

The wxListItem object can also contain item-specific colour and font information: for this you need to call one of setTextColour/2, setBackgroundColour/2 or setFont/2 functions on it passing it the colour/font to use. If the colour/font is not specified, the default list control colour/font is used.

See: wxListCtrl

wxWidgets docs: wxListItem

Summary

Functions

Resets the item state to the default.

Destroys the object.

Returns the alignment for this item.

Returns the background colour for this item.

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

Returns the font used to display the item.

Returns the zero-based item position.

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

Returns a bit mask indicating which fields of the structure are valid.

Returns a bit field representing the state of the item.

Returns the label/header text.

Returns the text colour.

Meaningful only for column headers in report mode.

Constructor.

Sets the alignment for the item.

Sets the background colour for the item.

Sets the zero-based column.

Sets the font for the item.

Sets the zero-based item position.

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

Sets the mask of valid fields.

Sets the item state flags (note that the valid state flags are influenced by the value of the state mask, see setStateMask/2).

Sets the bitmask that is used to determine which of the state flags are to be set.

Sets the text label for the item.

Sets the text colour for the item.

Meaningful only for column headers in report mode.

Types

-type wxListItem() :: wx:wx_object().

Functions

-spec clear(This) -> ok when This :: wxListItem().

Resets the item state to the default.

-spec destroy(This :: wxListItem()) -> ok.

Destroys the object.

-spec getAlign(This) -> wx:wx_enum() when This :: wxListItem().

Returns the alignment for this item.

Can be one of wxLIST_FORMAT_LEFT, wxLIST_FORMAT_RIGHT or wxLIST_FORMAT_CENTRE.

Link to this function

getBackgroundColour(This)

View Source
-spec getBackgroundColour(This) -> wx:wx_colour4() when This :: wxListItem().

Returns the background colour for this item.

-spec getColumn(This) -> integer() when This :: wxListItem().

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

-spec getFont(This) -> wxFont:wxFont() when This :: wxListItem().

Returns the font used to display the item.

-spec getId(This) -> integer() when This :: wxListItem().

Returns the zero-based item position.

-spec getImage(This) -> integer() when This :: wxListItem().

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

-spec getMask(This) -> integer() when This :: wxListItem().

Returns a bit mask indicating which fields of the structure are valid.

Can be any combination of the following values:

-spec getState(This) -> integer() when This :: wxListItem().

Returns a bit field representing the state of the item.

Can be any combination of:

-spec getText(This) -> unicode:charlist() when This :: wxListItem().

Returns the label/header text.

-spec getTextColour(This) -> wx:wx_colour4() when This :: wxListItem().

Returns the text colour.

-spec getWidth(This) -> integer() when This :: wxListItem().

Meaningful only for column headers in report mode.

Returns the column width.

-spec new() -> wxListItem().

Constructor.

-spec new(Item) -> wxListItem() when Item :: wxListItem().
-spec setAlign(This, Align) -> ok when This :: wxListItem(), Align :: wx:wx_enum().

Sets the alignment for the item.

See also getAlign/1

Link to this function

setBackgroundColour(This, ColBack)

View Source
-spec setBackgroundColour(This, ColBack) -> ok when This :: wxListItem(), ColBack :: wx:wx_colour().

Sets the background colour for the item.

-spec setColumn(This, Col) -> ok when This :: wxListItem(), Col :: integer().

Sets the zero-based column.

Meaningful only in report mode.

-spec setFont(This, Font) -> ok when This :: wxListItem(), Font :: wxFont:wxFont().

Sets the font for the item.

-spec setId(This, Id) -> ok when This :: wxListItem(), Id :: integer().

Sets the zero-based item position.

-spec setImage(This, Image) -> ok when This :: wxListItem(), Image :: integer().

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

-spec setMask(This, Mask) -> ok when This :: wxListItem(), Mask :: integer().

Sets the mask of valid fields.

See getMask/1.

-spec setState(This, State) -> ok when This :: wxListItem(), State :: integer().

Sets the item state flags (note that the valid state flags are influenced by the value of the state mask, see setStateMask/2).

See getState/1 for valid flag values.

Link to this function

setStateMask(This, StateMask)

View Source
-spec setStateMask(This, StateMask) -> ok when This :: wxListItem(), StateMask :: integer().

Sets the bitmask that is used to determine which of the state flags are to be set.

See also setState/2.

-spec setText(This, Text) -> ok when This :: wxListItem(), Text :: unicode:chardata().

Sets the text label for the item.

Link to this function

setTextColour(This, ColText)

View Source
-spec setTextColour(This, ColText) -> ok when This :: wxListItem(), ColText :: wx:wx_colour().

Sets the text colour for the item.

-spec setWidth(This, Width) -> ok when This :: wxListItem(), Width :: integer().

Meaningful only for column headers in report mode.

Sets the column width.