Contents Up Previous Next

wxListItem

This class stores information about a wxListCtrl item or column.

Derived from

wxObject

Include files

<wx/listctrl.h>

Members

wxListItem::wxListItem
wxListItem::Clear
wxListItem::GetAlign
wxListItem::GetBackgroundColour
wxListItem::GetColumn
wxListItem::GetData
wxListItem::GetFont
wxListItem::GetId
wxListItem::GetImage
wxListItem::GetMask
wxListItem::GetState
wxListItem::GetText
wxListItem::GetTextColour
wxListItem::GetWidth
wxListItem::SetAlign
wxListItem::SetBackgroundColour
wxListItem::SetColumn
wxListItem::SetData
wxListItem::SetFont
wxListItem::SetId
wxListItem::SetImage
wxListItem::SetMask
wxListItem::SetState
wxListItem::SetStateMask
wxListItem::SetText
wxListItem::SetTextColour
wxListItem::SetWidth


wxListItem::wxListItem

wxListItem()

Constructor.


wxListItem::Clear

void Clear()

Resets the item state to the default.


wxListItem::GetAlign

wxListColumnFormat GetAlign() const

Returns the alignment for this item. Can be one of wxLIST_FORMAT_LEFT, wxLIST_FORMAT_RIGHT or wxLIST_FORMAT_CENTRE.


wxListItem::GetBackgroundColour

wxColour GetBackgroundColour() const

Returns the background colour for this item.


wxListItem::GetColumn

int GetColumn() const

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


wxListItem::GetData

long GetData() const

Returns client data associated with the control.


wxListItem::GetFont

wxFont GetFont() const

Returns the font used to display the item.


wxListItem::GetId

long GetId() const

Returns the zero-based item position.


wxListItem::GetImage

int GetImage() const

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


wxListItem::GetMask

long GetMask() const

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

wxLIST_MASK_STATE GetState is valid.
wxLIST_MASK_TEXT GetText is valid.
wxLIST_MASK_IMAGE GetImage is valid.
wxLIST_MASK_DATA GetData is valid.
wxLIST_MASK_WIDTH GetWidth is valid.
wxLIST_MASK_FORMAT GetFormat is valid.


wxListItem::GetState

long GetState() const

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

wxLIST_STATE_DONTCARE Don't care what the state is. Win32 only.
wxLIST_STATE_DROPHILITED The item is highlighted to receive a drop event. Win32 only.
wxLIST_STATE_FOCUSED The item has the focus.
wxLIST_STATE_SELECTED The item is selected.
wxLIST_STATE_CUT The item is in the cut state. Win32 only.


wxListItem::GetText

const wxString& GetText() const

Returns the label/header text.


wxListItem::GetTextColour

wxColour GetTextColour() const

Returns the text colour.


wxListItem::GetWidth

int GetWidth() const

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


wxListItem::SetAlign

void SetAlign(wxListColumnFormat align)

Sets the alignment for the item. See also wxListItem::GetAlign


wxListItem::SetBackgroundColour

void SetBackgroundColour(const wxColour& colBack)

Sets the background colour for the item.


wxListItem::SetColumn

void SetColumn(int col)

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


wxListItem::SetData

void SetData(long data)

void SetData(void* data)

Sets client data for the item.


wxListItem::SetFont

void SetFont(const wxFont& font)

Sets the font for the item.


wxListItem::SetId

void SetId(long id)

Sets the zero-based item position.


wxListItem::SetImage

void SetImage(int image)

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


wxListItem::SetMask

void SetMask(long mask)

Sets the mask of valid fields. See wxListItem::GetMask.


wxListItem::SetState

void SetState(long state)

Sets the item state flags (note that the valid state flags are influenced by the value of the state mask, see wxListItem::SetStateMask). See wxListItem::GetState for valid flag values.


wxListItem::SetStateMask

void SetStateMask(long stateMask)

Sets the bitmask that is used to determine which of the state flags are to be set. See also wxListItem::SetState.


wxListItem::SetText

void SetText(const wxString& text)

Sets the text label for the item.


wxListItem::SetTextColour

void SetTextColour(const wxColour& colText)

Sets the text colour for the item.


wxListItem::SetWidth

void SetWidth(int width)

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