wx.lib.agw.hypertreelist.TreeListColumnInfo¶
Class used to store information (width, alignment flags, colours, etc…) about a
HyperTreeList column header.
Class Hierarchy¶
Methods Summary¶
Default class constructor. |
|
Returns the column text alignment. |
|
Returns the column text colour. |
|
Returns the column text font. |
|
Returns the column image index. |
|
Returns the column image index in the selected state. |
|
Returns the column sort icon displayed in the header. |
|
Return the colour of the sort icon ( |
|
Returns the column header label. |
|
Returns the column header width in pixels. |
|
Returns |
|
Returns |
|
Sets the column text alignment. |
|
Sets the column text colour. |
|
Sets the column as editable or non-editable. |
|
Sets the column text font. |
|
Sets the column image index. |
|
Sets the column image index in the selected state. |
|
Sets the column as shown or hidden. |
|
Sets the column sort icon displayed in the header. |
|
Sets the column header label. |
|
Sets the column header width. |
Class API¶
- class TreeListColumnInfo(object)¶
Class used to store information (width, alignment flags, colours, etc…) about a
HyperTreeListcolumn 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
HyperTreeListspecifying the image to use for the column;shown –
Trueto show the column,Falseto hide it;colour – a valid
wx.Colour, representing the text foreground colour for the column;edit –
Trueto set the column as editable,Falseotherwise.
- 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
Trueif the column is editable,Falseotherwise.
- IsShown(self)¶
Returns
Trueif the column is shown,Falseif it is hidden.
- SetAlignment(self, flag) Self¶
Sets the column text alignment.
- Parameters:
flag – the alignment flag, one of
wx.ALIGN_LEFT,wx.ALIGN_RIGHT,wx.ALIGN_CENTER.
- SetColour(self, colour) Self¶
Sets the column text colour.
- Parameters:
colour – a valid
wx.Colourobject.
- SetEditable(self, edit) Self¶
Sets the column as editable or non-editable.
- Parameters:
edit –
Trueif the column should be editable,Falseotherwise.
- SetImage(self, image) Self¶
Sets the column image index.
- Parameters:
image – an index within the normal image list assigned to
HyperTreeListspecifying the image to use for the column.
- SetSelectedImage(self, image) Self¶
Sets the column image index in the selected state.
- Parameters:
image – an index within the normal image list assigned to
HyperTreeListspecifying the image to use for the column when in selected state.
- SetShown(self, shown) Self¶
Sets the column as shown or hidden.
- Parameters:
shown –
Trueif the column should be shown,Falseif it should be hidden.
- SetSortIcon(self, sortIcon, colour=None) Self¶
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
Noneto restore native colour.
- SetText(self, text) Self¶
Sets the column header label.
- Parameters:
text – the new column header text.
- SetWidth(self, width) Self¶
Sets the column header width.
- Parameters:
width – the column header width, in pixels.