wx.ListItem

Inheritance diagram for wx.ListItem:



Class API

Methods

__init__()
No docstrings available for this method.

Clear()
Resets the item state to the default.

ClearAttributes()
No docstrings available for this method.

GetAlign()

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


Returns:

int


GetAttributes()
No docstrings available for this method.

GetBackgroundColour()

Returns the background colour for this item.


Returns:

wx.Colour


GetColumn()

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


Returns:

int


GetData()

Returns client data associated with the control. Please note that client data is associated with the item and not with subitems.


Returns:

long


GetFont()

Returns the font used to display the item.


Returns:

wx.Font


GetId()

Returns the zero-based item position.


Returns:

long


GetImage()

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


Returns:

int


GetMask()

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

Mask Flag Description
wx.LIST_MASK_STATE GetState is valid.
wx.LIST_MASK_TEXT GetText is valid.
wx.LIST_MASK_IMAGE GetImage is valid.
wx.LIST_MASK_DATA GetData is valid.
wx.LIST_MASK_WIDTH GetWidth is valid.
wx.LIST_MASK_FORMAT GetFormat is valid.

Returns:

long


GetState()

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

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

Returns:

long


GetText()

Returns the label/header text.


Returns:

string


GetTextColour()

Returns the text colour.


Returns:

wx.Colour


GetWidth()

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


Returns:

int


HasAttributes()
No docstrings available for this method.

SetAlign(align)

Sets the alignment for the item.

Parameters:

  • align (int)

See also

GetAlign


SetBackgroundColour(colBack)

Sets the background colour for the item.

Parameters:


SetColumn(col)

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

Parameters:

  • col (int)

SetData(data)

Sets client data for the item. Please note that client data is associated with the item and not with subitems.

Parameters:

  • data (long)

SetFont(font)

Sets the font for the item.

Parameters:


SetId(id)

Sets the zero-based item position.

Parameters:

  • id (long)

SetImage(image)

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

Parameters:

  • image (int)

SetMask(mask)

Sets the mask of valid fields.

Parameters:

  • mask (long)

See also

GetMask


SetState(state)

Sets the item state flags (note that the valid state flags are influenced by the value of the state mask.

See GetState for valid flag values.

Parameters:

  • state (long)

SetStateMask(stateMask)

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

Parameters:

  • stateMask (long)

See also

SetState


SetText(text)

Sets the text label for the item.

Parameters:

  • text (string)

SetTextColour(colText)

Sets the text colour for the item.

Parameters:


SetWidth(width)

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

Parameters:

  • width (int)

Properties

Align
See GetAlign and SetAlign
Attributes
See GetAttributes
BackgroundColour
See GetBackgroundColour and SetBackgroundColour
Column
See GetColumn and SetColumn
Data
See GetData and SetData
Font
See GetFont and SetFont
Id
See GetId and SetId
Image
See GetImage and SetImage
Mask
See GetMask and SetMask
State
See GetState and SetState
Text
See GetText and SetText
TextColour
See GetTextColour and SetTextColour
Width
See GetWidth and SetWidth
m_col
m_data
m_format
m_image
m_itemId
m_mask
m_state
m_stateMask
m_text
m_width