AGW Logo

agw_title HyperTreeList

HyperTreeList is a class that mimics the behaviour of wx.gizmos.TreeListCtrl, with almost the same base functionalities plus some more enhancements. This class does not rely on the native control, as it is a full owner-drawn tree-list control.

hierarchy Inheritance Diagram

Inheritance diagram for: HyperTreeList

Inheritance diagram of HyperTreeList


appearance Control Appearance


HyperTreeList

HyperTreeList


method_summary Methods Summary

__init__Default class constructor.
AddColumnAppends a column to the HyperTreeList.
AddColumnInfoAppends a column to the HyperTreeList.
AddRoot
AppendItem
AssignButtonsImageList
AssignImageList
AssignStateImageList
AutoCheckChild
AutoCheckParent
AutoToggleChild
CalculateAndSetHeaderHeightCalculates the best header height and stores it.
CheckChilds
CheckItem
CheckItem2
CheckSameLevel
Collapse
CollapseAndReset
CreateEditCtrlCreate an edit control for editing a label of an item.
Delete
DeleteAllItems
DeleteChildren
DeleteRoot
DoGetBestSizeGets the size which best suits the window: for a control, it would be the
DoHeaderLayoutLayouts the header control.
EditLabel
EnableChildren
EnableItem
EnableSelectionGradient
EnableSelectionVista
EnsureVisible
Expand
ExpandAll
ExpandAllChildren
FindItem
GetAGWWindowStyleFlagReturns the HyperTreeList window style flag.
GetBackgroundImage
GetBorderPen
GetBoundingRect
GetButtonsImageList
GetChildrenCount
GetClassDefaultAttributesReturns the default font and colours which are used by the control.
GetColumnReturns an instance of TreeListColumnInfo containing column information.
GetColumnAlignmentReturns the column text alignment.
GetColumnColourReturns the column text colour.
GetColumnCount
GetColumnFontReturns the column text font.
GetColumnImageReturns the image assigned to the specified column.
GetColumnTextReturns the column text label.
GetColumnWidthReturns the column width, in pixels.
GetConnectionPen
GetCurrentItem
GetDisabledColour
GetEditControl
GetFirstChild
GetFirstExpandedItem
GetFirstGradientColour
GetFirstVisibleItem
GetGradientStyle
GetHeaderWindowReturns the header window, an instance of TreeListHeaderWindow.
GetHilightFocusColour
GetHilightNonFocusColour
GetHyperTextFont
GetHyperTextNewColour
GetHyperTextVisitedColour
GetImageList
GetImageListCheck
GetIndent
GetItem3StateValue
GetItemBackgroundColour
GetItemFont
GetItemImage
GetItemParent
GetItemPyData
GetItemText
GetItemTextColour
GetItemType
GetItemVisited
GetItemWindow
GetItemWindowEnabled
GetLastChild
GetMainWindowReturns the main window, an instance of TreeListMainWindow.
GetNext
GetNextChild
GetNextExpanded
GetNextSibling
GetNextVisible
GetPrev
GetPrevChild
GetPrevExpanded
GetPrevSibling
GetPrevVisible
GetPyData
GetRootItem
GetSecondGradientColour
GetSelection
GetSelections
GetSpacing
GetStateImageList
GetTextCtrlAlignmentStyleReturn the alignment style to use for the text control that is used to edit labels of items.
GetTextCtrlStyleReturn the style to use for the text control that is used to edit labels of items.
HasAGWFlagReturns whether a flag is present in the HyperTreeList style.
HasChildren
HideItem
HitTest
InsertColumnInserts a column to the HyperTreeList at the position specified
InsertColumnInfoInserts a column to the HyperTreeList at the position specified
InsertItem
IsBold
IsColumnEditableReturns True if the column is editable, False otherwise.
IsColumnShownReturns True if the column is shown, False otherwise.
IsDescendantOf
IsExpanded
IsItem3State
IsItemChecked
IsItemEnabled
IsItemHyperText
IsItemVisible
IsSelected
ItemHasChildren
OnCompareItemsReturns whether 2 items have the same text.
OnGetItemTextThis function must be overloaded in the derived class for a control
OnSizeHandles the wx.EVT_SIZE event for HyperTreeList.
PrependItem
RefreshCauses this window, and all of its children recursively (except under wxGTK1
RemoveColumnRemoves a column from the HyperTreeList.
ScrollTo
SelectAll
SelectAllChildren
SelectItem
SetAGWWindowStyleFlagSets the window style for HyperTreeList.
SetBackgroundColourChanges the background colour of HyperTreeList.
SetBackgroundImage
SetBorderPen
SetBufferedSets/unsets the double buffering for the header and the main window.
SetButtonsImageList
SetColumnSets a column using an instance of TreeListColumnInfo.
SetColumnAlignmentSets the column text alignment.
SetColumnColourSets the column text colour.
SetColumnEditableSets the column as editable or non-editable.
SetColumnFontSets the column text font.
SetColumnImageSets an image on the specified column.
SetColumnShownSets the column as shown or hidden.
SetColumnTextSets the column text label.
SetColumnWidthSets the column width, in pixels.
SetConnectionPen
SetDisabledColour
SetDragItem
SetFirstGradientColour
SetFocusThis sets the window to receive keyboard input.
SetFontSets the default font for the header window and the main window.
SetForegroundColourChanges the foreground colour of HyperTreeList.
SetGradientStyle
SetHeaderCustomRendererAssociate a custom renderer with the header - all columns will use it :param renderer: a class able to correctly render header buttons ..
SetHeaderFontSets the default font for the header window..
SetHilightFocusColour
SetHilightNonFocusColour
SetHyperTextFont
SetHyperTextNewColour
SetHyperTextVisitedColour
SetImageList
SetImageListCheck
SetIndent
SetItem3State
SetItem3StateValue
SetItemBackgroundColour
SetItemBold
SetItemDropHighlight
SetItemFont
SetItemHasChildren
SetItemHyperText
SetItemImage
SetItemItalic
SetItemPyData
SetItemText
SetItemTextColour
SetItemType
SetItemVisited
SetItemWindow
SetItemWindowEnabled
SetMainColumn
SetPyData
SetSecondGradientColour
SetSpacing
SetStateImageList
ShouldInheritColours
SortChildrenSorts the children of the given item using OnCompareItems method of HyperTreeList.
Toggle
ToggleItemSelection
UnCheckRadioParent
Unselect
UnselectAll

API Class API

class HyperTreeList(wx.PyControl)[source]

HyperTreeList is a class that mimics the behaviour of wx.gizmos.TreeListCtrl, with almost the same base functionalities plus some more enhancements. This class does not rely on the native control, as it is a full owner-drawn tree-list control.



__init__(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=wx.TR_DEFAULT_STYLE, validator=wx.DefaultValidator, name="HyperTreeList")[source]

Default class constructor.

Parameters:
  • parent – parent window. Must not be None;
  • id – window identifier. A value of -1 indicates a default value;
  • pos – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;
  • size – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform;
  • style – the underlying wx.PyScrolledWindow style;
  • agwStyle – the AGW-specific HyperTreeList window style. This can be a combination of the following bits:


    Window Styles Hex Value Description
    TR_NO_BUTTONS 0x0 For convenience to document that no buttons are to be drawn.
    TR_SINGLE 0x0 For convenience to document that only one item may be selected at a time. Selecting another item causes the current selection, if any, to be deselected. This is the default.
    TR_HAS_BUTTONS 0x1 Use this style to show + and - buttons to the left of parent items.
    TR_NO_LINES 0x4 Use this style to hide vertical level connectors.
    TR_LINES_AT_ROOT 0x8 Use this style to show lines between root nodes. Only applicable if TR_HIDE_ROOT is set and TR_NO_LINES is not set.
    TR_DEFAULT_STYLE 0x9 The set of flags that are closest to the defaults for the native control for a particular toolkit.
    TR_TWIST_BUTTONS 0x10 Use old Mac-twist style buttons.
    TR_MULTIPLE 0x20 Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected.
    TR_EXTENDED 0x40 Use this style to allow disjoint items to be selected. (Only partially implemented; may not work in all cases).
    TR_HAS_VARIABLE_ROW_HEIGHT 0x80 Use this style to cause row heights to be just big enough to fit the content. If not set, all rows use the largest row height. The default is that this flag is unset.
    TR_EDIT_LABELS 0x200 Use this style if you wish the user to be able to edit labels in the tree control.
    TR_ROW_LINES 0x400 Use this style to draw a contrasting border between displayed rows.
    TR_HIDE_ROOT 0x800 Use this style to suppress the display of the root node, effectively causing the first-level nodes to appear as a series of root nodes.
    TR_COLUMN_LINES 0x1000 Use this style to draw a contrasting border between displayed columns.
    TR_FULL_ROW_HIGHLIGHT 0x2000 Use this style to have the background colour and the selection highlight extend over the entire horizontal row of the tree control window.
    TR_AUTO_CHECK_CHILD 0x4000 Only meaningful foe checkbox-type items: when a parent item is checked/unchecked its children are checked/unchecked as well.
    TR_AUTO_TOGGLE_CHILD 0x8000 Only meaningful foe checkbox-type items: when a parent item is checked/unchecked its children are toggled accordingly.
    TR_AUTO_CHECK_PARENT 0x10000 Only meaningful foe checkbox-type items: when a child item is checked/unchecked its parent item is checked/unchecked as well.
    TR_ALIGN_WINDOWS 0x20000 Flag used to align windows (in items with windows) at the same horizontal position.
    TR_NO_HEADER 0x40000 Use this style to hide the columns header.
    TR_ELLIPSIZE_LONG_ITEMS 0x80000 Flag used to ellipsize long items when the horizontal space for CustomTreeCtrl is low.
    TR_VIRTUAL 0x100000 HyperTreeList will have virtual behaviour.
  • validator – window validator;
  • name – window name.


AddColumn(text, width=_DEFAULT_COL_WIDTH, flag=wx.ALIGN_LEFT, image=-1, shown=True, colour=None, edit=False)[source]

Appends a column to the HyperTreeList.

Parameters:
  • text – the column text label;
  • 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.


AddColumnInfo(colInfo)[source]

Appends a column to the HyperTreeList.

Parameters:colInfo – an instance of TreeListColumnInfo.


AddRoot(*args, **kwargs)


AppendItem(*args, **kwargs)


AssignButtonsImageList(*args, **kwargs)


AssignImageList(*args, **kwargs)


AssignStateImageList(*args, **kwargs)


AutoCheckChild(*args, **kwargs)


AutoCheckParent(*args, **kwargs)


AutoToggleChild(*args, **kwargs)


CalculateAndSetHeaderHeight()[source]

Calculates the best header height and stores it.



CheckChilds(*args, **kwargs)


CheckItem(*args, **kwargs)


CheckItem2(*args, **kwargs)


CheckSameLevel(*args, **kwargs)


Collapse(*args, **kwargs)


CollapseAndReset(*args, **kwargs)


CreateEditCtrl(item, column)[source]

Create an edit control for editing a label of an item. By default, this returns a text control.

Override this function in the derived class to return a different type of control.

Parameters:
  • item – an instance of TreeListItem;
  • column – an integer specifying the column index.


Delete(*args, **kwargs)


DeleteAllItems(*args, **kwargs)


DeleteChildren(*args, **kwargs)


DeleteRoot(*args, **kwargs)


DoGetBestSize()[source]

Gets the size which best suits the window: for a control, it would be the minimal size which doesn’t truncate the control, for a panel - the same size as it would have after a call to Fit().

Note

Overridden from wx.PyControl.



DoHeaderLayout()[source]

Layouts the header control.



EditLabel(*args, **kwargs)


EnableChildren(*args, **kwargs)


EnableItem(*args, **kwargs)


EnableSelectionGradient(*args, **kwargs)


EnableSelectionVista(*args, **kwargs)


EnsureVisible(*args, **kwargs)


Expand(*args, **kwargs)


ExpandAll(*args, **kwargs)


ExpandAllChildren(*args, **kwargs)


FindItem(*args, **kwargs)


GetAGWWindowStyleFlag()[source]

Returns the HyperTreeList window style flag.

See also

SetAGWWindowStyleFlag for a list of valid window styles.



GetBackgroundImage(*args, **kwargs)


GetBorderPen(*args, **kwargs)


GetBoundingRect(*args, **kwargs)


GetButtonsImageList(*args, **kwargs)


GetChildrenCount(*args, **kwargs)


classmethod GetClassDefaultAttributes()[source]

Returns the default font and colours which are used by the control. This is useful if you want to use the same font or colour in your own control as in a standard control – which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the users system, especially if it uses themes.

This static method is “overridden’’ in many derived classes and so calling, for example, wx.Button.GetClassDefaultAttributes() will typically return the values appropriate for a button which will be normally different from those returned by, say, wx.ListCtrl.GetClassDefaultAttributes().

Note

The wx.VisualAttributes structure has at least the fields font, colFg and colBg. All of them may be invalid if it was not possible to determine the default control appearance or, especially for the background colour, if the field doesn’t make sense as is the case for colBg for the controls with themed background.



GetColumn(column)[source]

Returns an instance of TreeListColumnInfo containing column information.

Parameters:column – an integer specifying the column index.


GetColumnAlignment(column)[source]

Returns the column text alignment.

Parameters:column – an integer specifying the column index.


GetColumnColour(column)[source]

Returns the column text colour.

Parameters:column – an integer specifying the column index.


GetColumnCount(*args, **kwargs)


GetColumnFont(column)[source]

Returns the column text font.

Parameters:column – an integer specifying the column index.


GetColumnImage(column)[source]

Returns the image assigned to the specified column.

Parameters:column – an integer specifying the column index.


GetColumnText(column)[source]

Returns the column text label.

Parameters:column – an integer specifying the column index.


GetColumnWidth(column)[source]

Returns the column width, in pixels.

Parameters:column – an integer specifying the column index.


GetConnectionPen(*args, **kwargs)


GetCurrentItem(*args, **kwargs)


GetDisabledColour(*args, **kwargs)


GetEditControl(*args, **kwargs)


GetFirstChild(*args, **kwargs)


GetFirstExpandedItem(*args, **kwargs)


GetFirstGradientColour(*args, **kwargs)


GetFirstVisibleItem(*args, **kwargs)


GetGradientStyle(*args, **kwargs)


GetHeaderWindow()[source]

Returns the header window, an instance of TreeListHeaderWindow.



GetHilightFocusColour(*args, **kwargs)


GetHilightNonFocusColour(*args, **kwargs)


GetHyperTextFont(*args, **kwargs)


GetHyperTextNewColour(*args, **kwargs)


GetHyperTextVisitedColour(*args, **kwargs)


GetImageList(*args, **kwargs)


GetImageListCheck(*args, **kwargs)


GetIndent(*args, **kwargs)


GetItem3StateValue(*args, **kwargs)


GetItemBackgroundColour(*args, **kwargs)


GetItemFont(*args, **kwargs)


GetItemImage(*args, **kwargs)


GetItemParent(*args, **kwargs)


GetItemPyData(*args, **kwargs)


GetItemText(*args, **kwargs)


GetItemTextColour(*args, **kwargs)


GetItemType(*args, **kwargs)


GetItemVisited(*args, **kwargs)


GetItemWindow(*args, **kwargs)


GetItemWindowEnabled(*args, **kwargs)


GetLastChild(*args, **kwargs)


GetMainWindow()[source]

Returns the main window, an instance of TreeListMainWindow.



GetNext(*args, **kwargs)


GetNextChild(*args, **kwargs)


GetNextExpanded(*args, **kwargs)


GetNextSibling(*args, **kwargs)


GetNextVisible(*args, **kwargs)


GetPrev(*args, **kwargs)


GetPrevChild(*args, **kwargs)


GetPrevExpanded(*args, **kwargs)


GetPrevSibling(*args, **kwargs)


GetPrevVisible(*args, **kwargs)


GetPyData(*args, **kwargs)


GetRootItem(*args, **kwargs)


GetSecondGradientColour(*args, **kwargs)


GetSelection(*args, **kwargs)


GetSelections(*args, **kwargs)


GetSpacing(*args, **kwargs)


GetStateImageList(*args, **kwargs)


GetTextCtrlAlignmentStyle(column)[source]

Return the alignment style to use for the text control that is used to edit labels of items. The alignment style is derived from the column alignment.

Parameters:column – an integer specifying the column index.


GetTextCtrlStyle(column)[source]

Return the style to use for the text control that is used to edit labels of items.

Override this function in the derived class to support a different style, e.g. wx.TE_MULTILINE.

Parameters:column – an integer specifying the column index.


HasAGWFlag(flag)[source]

Returns whether a flag is present in the HyperTreeList style.

Parameters:flag – one of the possible HyperTreeList window styles.

See also

SetAGWWindowStyleFlag for a list of possible window style flags.



HasChildren(*args, **kwargs)


HideItem(*args, **kwargs)


HitTest(*args, **kwargs)


InsertColumn(before, text, width=_DEFAULT_COL_WIDTH, flag=wx.ALIGN_LEFT, image=-1, shown=True, colour=None, edit=False)[source]

Inserts a column to the HyperTreeList at the position specified by before.

Parameters:
  • before – the index at which we wish to insert the new column;
  • text – the column text label;
  • 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.


InsertColumnInfo(before, colInfo)[source]

Inserts a column to the HyperTreeList at the position specified by before.

Parameters:
  • before – the index at which we wish to insert the new column;
  • colInfo – an instance of TreeListColumnInfo.


InsertItem(*args, **kwargs)


IsBold(*args, **kwargs)


IsColumnEditable(column)[source]

Returns True if the column is editable, False otherwise.

Parameters:column – an integer specifying the column index.


IsColumnShown(column)[source]

Returns True if the column is shown, False otherwise.

Parameters:column – an integer specifying the column index.


IsDescendantOf(*args, **kwargs)


IsExpanded(*args, **kwargs)


IsItem3State(*args, **kwargs)


IsItemChecked(*args, **kwargs)


IsItemEnabled(*args, **kwargs)


IsItemHyperText(*args, **kwargs)


IsItemVisible(*args, **kwargs)


IsSelected(*args, **kwargs)


ItemHasChildren(*args, **kwargs)


OnCompareItems(item1, item2)[source]

Returns whether 2 items have the same text.

Override this function in the derived class to change the sort order of the items in the HyperTreeList. The function should return a negative, zero or positive value if the first item is less than, equal to or greater than the second one.

Parameters:

Note

The base class version compares items alphabetically.



OnGetItemText(item, column)[source]

This function must be overloaded in the derived class for a control with TR_VIRTUAL style. It should return the string containing the text of the given column for the specified item.

Parameters:
  • item – an instance of TreeListItem;
  • column – an integer specifying the column index.


OnSize(event)[source]

Handles the wx.EVT_SIZE event for HyperTreeList.

Parameters:event – a wx.SizeEvent event to be processed.


PrependItem(*args, **kwargs)


Refresh(erase=True, rect=None)[source]

Causes this window, and all of its children recursively (except under wxGTK1 where this is not implemented), to be repainted.

Parameters:
  • erase – If True, the background will be erased;
  • rect – If not None, only the given rectangle will be treated as damaged.

Note

Note that repainting doesn’t happen immediately but only during the next event loop iteration, if you need to update the window immediately you should use Update instead.

Note

Overridden from wx.PyControl.



RemoveColumn(column)[source]

Removes a column from the HyperTreeList.

Parameters:column – an integer specifying the column index.


ScrollTo(*args, **kwargs)


SelectAll(*args, **kwargs)


SelectAllChildren(*args, **kwargs)


SelectItem(*args, **kwargs)


SetAGWWindowStyleFlag(agwStyle)[source]

Sets the window style for HyperTreeList.

Parameters:agwStyle – can be a combination of the following bits:


Window Styles Hex Value Description
TR_NO_BUTTONS 0x0 For convenience to document that no buttons are to be drawn.
TR_SINGLE 0x0 For convenience to document that only one item may be selected at a time. Selecting another item causes the current selection, if any, to be deselected. This is the default.
TR_HAS_BUTTONS 0x1 Use this style to show + and - buttons to the left of parent items.
TR_NO_LINES 0x4 Use this style to hide vertical level connectors.
TR_LINES_AT_ROOT 0x8 Use this style to show lines between root nodes. Only applicable if TR_HIDE_ROOT is set and TR_NO_LINES is not set.
TR_DEFAULT_STYLE 0x9 The set of flags that are closest to the defaults for the native control for a particular toolkit.
TR_TWIST_BUTTONS 0x10 Use old Mac-twist style buttons.
TR_MULTIPLE 0x20 Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected.
TR_EXTENDED 0x40 Use this style to allow disjoint items to be selected. (Only partially implemented; may not work in all cases).
TR_HAS_VARIABLE_ROW_HEIGHT 0x80 Use this style to cause row heights to be just big enough to fit the content. If not set, all rows use the largest row height. The default is that this flag is unset.
TR_EDIT_LABELS 0x200 Use this style if you wish the user to be able to edit labels in the tree control.
TR_ROW_LINES 0x400 Use this style to draw a contrasting border between displayed rows.
TR_HIDE_ROOT 0x800 Use this style to suppress the display of the root node, effectively causing the first-level nodes to appear as a series of root nodes.
TR_COLUMN_LINES 0x1000 Use this style to draw a contrasting border between displayed columns.
TR_FULL_ROW_HIGHLIGHT 0x2000 Use this style to have the background colour and the selection highlight extend over the entire horizontal row of the tree control window.
TR_AUTO_CHECK_CHILD 0x4000 Only meaningful foe checkbox-type items: when a parent item is checked/unchecked its children are checked/unchecked as well.
TR_AUTO_TOGGLE_CHILD 0x8000 Only meaningful foe checkbox-type items: when a parent item is checked/unchecked its children are toggled accordingly.
TR_AUTO_CHECK_PARENT 0x10000 Only meaningful foe checkbox-type items: when a child item is checked/unchecked its parent item is checked/unchecked as well.
TR_ALIGN_WINDOWS 0x20000 Flag used to align windows (in items with windows) at the same horizontal position.
TR_NO_HEADER 0x40000 Use this style to hide the columns header.
TR_ELLIPSIZE_LONG_ITEMS 0x80000 Flag used to ellipsize long items when the horizontal space for CustomTreeCtrl is low.
TR_VIRTUAL 0x100000 HyperTreeList will have virtual behaviour.

Note

Please note that some styles cannot be changed after the window creation and that Refresh() might need to be be called after changing the others for the change to take place immediately.



SetBackgroundColour(colour)[source]

Changes the background colour of HyperTreeList.

Parameters:colour – the colour to be used as the background colour, pass wx.NullColour to reset to the default colour.

Note

The background colour is usually painted by the default wx.EraseEvent event handler function under Windows and automatically under GTK.

Note

Setting the background colour does not cause an immediate refresh, so you may wish to call wx.Window.ClearBackground or wx.Window.Refresh after calling this function.

Note

Overridden from wx.PyControl.



SetBackgroundImage(*args, **kwargs)


SetBorderPen(*args, **kwargs)


SetBuffered(buffered)[source]

Sets/unsets the double buffering for the header and the main window.

Parameters:bufferedTrue to use double-buffering, False otherwise.

Note

Currently we are using double-buffering only on Windows XP.



SetButtonsImageList(*args, **kwargs)


SetColumn(column, colInfo)[source]

Sets a column using an instance of TreeListColumnInfo.

Parameters:
  • column – an integer specifying the column index;
  • info – an instance of TreeListColumnInfo.


SetColumnAlignment(column, flag)[source]

Sets the column text alignment.

Parameters:
  • column – an integer specifying the column index;
  • flag – the alignment flag, one of wx.ALIGN_LEFT, wx.ALIGN_RIGHT, wx.ALIGN_CENTER.


SetColumnColour(column, colour)[source]

Sets the column text colour.

Parameters:
  • column – an integer specifying the column index;
  • colour – a valid wx.Colour object.



SetColumnEditable(column, edit)[source]

Sets the column as editable or non-editable.

Parameters:
  • column – an integer specifying the column index;
  • editTrue if the column should be editable, False otherwise.


SetColumnFont(column, font)[source]

Sets the column text font.

Parameters:
  • column – an integer specifying the column index;
  • font – a valid wx.Font object.


SetColumnImage(column, image)[source]

Sets an image on the specified column.

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


SetColumnShown(column, shown)[source]

Sets the column as shown or hidden.

Parameters:
  • column – an integer specifying the column index;
  • shownTrue if the column should be shown, False if it should be hidden.


SetColumnText(column, text)[source]

Sets the column text label.

Parameters:
  • column – an integer specifying the column index;
  • text – the new column label.


SetColumnWidth(column, width)[source]

Sets the column width, in pixels.

Parameters:
  • column – an integer specifying the column index;
  • width – the new column width, in pixels.


SetConnectionPen(*args, **kwargs)


SetDisabledColour(*args, **kwargs)


SetDragItem(*args, **kwargs)


SetFirstGradientColour(*args, **kwargs)


SetFocus()[source]

This sets the window to receive keyboard input.



SetFont(font)[source]

Sets the default font for the header window and the main window.

Parameters:font – a valid wx.Font object.



SetForegroundColour(colour)[source]

Changes the foreground colour of HyperTreeList.

Parameters:colour – the colour to be used as the foreground colour, pass wx.NullColour to reset to the default colour.

Note

Overridden from wx.PyControl.



SetGradientStyle(*args, **kwargs)


SetHeaderCustomRenderer(renderer=None)[source]

Associate a custom renderer with the header - all columns will use it

Parameters:renderer – a class able to correctly render header buttons

Note

the renderer class must implement the method DrawHeaderButton



SetHeaderFont(font)[source]

Sets the default font for the header window..

Parameters:font – a valid wx.Font object.



SetHilightFocusColour(*args, **kwargs)


SetHilightNonFocusColour(*args, **kwargs)


SetHyperTextFont(*args, **kwargs)


SetHyperTextNewColour(*args, **kwargs)


SetHyperTextVisitedColour(*args, **kwargs)


SetImageList(*args, **kwargs)


SetImageListCheck(*args, **kwargs)


SetIndent(*args, **kwargs)


SetItem3State(*args, **kwargs)


SetItem3StateValue(*args, **kwargs)


SetItemBackgroundColour(*args, **kwargs)


SetItemBold(*args, **kwargs)


SetItemDropHighlight(*args, **kwargs)


SetItemFont(*args, **kwargs)


SetItemHasChildren(*args, **kwargs)


SetItemHyperText(*args, **kwargs)


SetItemImage(*args, **kwargs)


SetItemItalic(*args, **kwargs)


SetItemPyData(*args, **kwargs)


SetItemText(*args, **kwargs)


SetItemTextColour(*args, **kwargs)


SetItemType(*args, **kwargs)


SetItemVisited(*args, **kwargs)


SetItemWindow(*args, **kwargs)


SetItemWindowEnabled(*args, **kwargs)


SetMainColumn(*args, **kwargs)


SetPyData(*args, **kwargs)


SetSecondGradientColour(*args, **kwargs)


SetSpacing(*args, **kwargs)


SetStateImageList(*args, **kwargs)


ShouldInheritColours(*args, **kwargs)


SortChildren(item)[source]

Sorts the children of the given item using OnCompareItems method of HyperTreeList. You should override that method to change the sort order (the default is ascending case-sensitive alphabetical order).

Parameters:item – an instance of TreeListItem;


Toggle(*args, **kwargs)


ToggleItemSelection(*args, **kwargs)


UnCheckRadioParent(*args, **kwargs)


Unselect(*args, **kwargs)


UnselectAll(*args, **kwargs)
Tree

Table Of Contents

Previous topic

EditTextCtrl

Next topic

TreeListColumnInfo