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. please note that client data is associated with the item and not with subitems.


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. please note that client data is associated with the item and not with subitems.


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.