phoenix_title wx.lib.agw.hypertreelist.TreeListColumnInfo

Class used to store information (width, alignment flags, colours, etc…) about a HyperTreeList column header.


class_hierarchy Class Hierarchy

Inheritance diagram for class TreeListColumnInfo:

method_summary Methods Summary

__init__

Default class constructor.

GetAlignment

Returns the column text alignment.

GetColour

Returns the column text colour.

GetFont

Returns the column text font.

GetImage

Returns the column image index.

GetSelectedImage

Returns the column image index in the selected state.

GetSortIcon

Returns the column sort icon displayed in the header.

GetSortIconColour

Return the colour of the sort icon (None = Default).

GetText

Returns the column header label.

GetWidth

Returns the column header width in pixels.

IsEditable

Returns True if the column is editable, False otherwise.

IsShown

Returns True if the column is shown, False if it is hidden.

SetAlignment

Sets the column text alignment.

SetColour

Sets the column text colour.

SetEditable

Sets the column as editable or non-editable.

SetFont

Sets the column text font.

SetImage

Sets the column image index.

SetSelectedImage

Sets the column image index in the selected state.

SetShown

Sets the column as shown or hidden.

SetSortIcon

Sets the column sort icon displayed in the header.

SetText

Sets the column header label.

SetWidth

Sets the column header width.


api Class API

class TreeListColumnInfo(object)

Class used to store information (width, alignment flags, colours, etc…) about a HyperTreeList column header.


Methods

__init__(self, input="", width=_DEFAULT_COL_WIDTH, flag=wx.ALIGN_LEFT, image=-1, shown=True, colour=None, edit=False)

Default class constructor.

Parameters
  • input – can be a string (representing the column header text) or another instance of TreeListColumnInfo. In the latter case, all the other input parameters are not used;

  • width – the column width in pixels;

  • flag – the column alignment flag, one of wx.ALIGN_LEFT, wx.ALIGN_RIGHT, wx.ALIGN_CENTER;

  • image – an index within the normal image list assigned to HyperTreeList specifying the image to use for the column;

  • shownTrue to show the column, False to hide it;

  • colour – a valid wx.Colour, representing the text foreground colour for the column;

  • editTrue to set the column as editable, False otherwise.



GetAlignment(self)

Returns the column text alignment.



GetColour(self)

Returns the column text colour.



GetFont(self)

Returns the column text font.



GetImage(self)

Returns the column image index.



GetSelectedImage(self)

Returns the column image index in the selected state.



GetSortIcon(self)

Returns the column sort icon displayed in the header.



GetSortIconColour(self)

Return the colour of the sort icon (None = Default).



GetText(self)

Returns the column header label.



GetWidth(self)

Returns the column header width in pixels.



IsEditable(self)

Returns True if the column is editable, False otherwise.



IsShown(self)

Returns True if the column is shown, False if it is hidden.



SetAlignment(self, flag)

Sets the column text alignment.

Parameters

flag – the alignment flag, one of wx.ALIGN_LEFT, wx.ALIGN_RIGHT, wx.ALIGN_CENTER.



SetColour(self, colour)

Sets the column text colour.

Parameters

colour – a valid wx.Colour object.



SetEditable(self, edit)

Sets the column as editable or non-editable.

Parameters

editTrue if the column should be editable, False otherwise.



SetFont(self, font)

Sets the column text font.

Parameters

font – a valid wx.Font object.



SetImage(self, image)

Sets the column image index.

Parameters

image – an index within the normal image list assigned to HyperTreeList specifying the image to use for the column.



SetSelectedImage(self, image)

Sets the column image index in the selected state.

Parameters

image – an index within the normal image list assigned to HyperTreeList specifying the image to use for the column when in selected state.



SetShown(self, shown)

Sets the column as shown or hidden.

Parameters

shownTrue if the column should be shown, False if it should be hidden.



SetSortIcon(self, sortIcon, colour=None)

Sets the column sort icon displayed in the header.

Parameters
  • sortIcon – the sort icon to display, one of wx.HDR_SORT_ICON_NONE, wx.HDR_SORT_ICON_UP, wx.HDR_SORT_ICON_DOWN.

  • colour – the colour of the sort icon as a wx.Colour. Optional. Set to None to restore native colour.



SetText(self, text)

Sets the column header label.

Parameters

text – the new column header text.



SetWidth(self, width)

Sets the column header width.

Parameters

width – the column header width, in pixels.