phoenix_title wx.lib.mixins.treemixin

treemixin.py

This module provides three mixin classes that can be used with tree controls:

  • VirtualTree is a class that, when mixed in with a tree control, makes the tree control virtual, similar to a ListCtrl in virtual mode. A virtual tree control builds the tree itself by means of callbacks, so the programmer is freed from the burden of building the tree herself.

  • DragAndDrop is a mixin class that helps with dragging and dropping of items. The graphical part of dragging and dropping tree items is done by this mixin class. You only need to implement the OnDrop method that is called when the drop happens.

  • ExpansionState is a mixin that can be queried for the expansion state of all items in the tree to restore it later.

All mixin classes work with wx.TreeCtrl, wx.gizmos.TreeListCtrl, and wx.lib.customtreectrl.CustomTreeCtrl. They can be used together or separately.

The VirtualTree and DragAndDrop mixins force the wx.TR_HIDE_ROOT style.

Module author: Frank Niessink <frank@niessink.com>

License: wxWidgets license Version: 1.1 Date: 24 September 2007

ExpansionState is based on code and ideas from Karsten Hilbert. Andrea Gavana provided help with the CustomTreeCtrl integration.

class_summary Classes Summary

DragAndDrop

This is a mixin class that can be used to easily implement

ExpansionState

This is a mixin class that can be used to save and restore

TreeAPIHarmonizer

This class attempts to hide the differences in API between the

TreeHelper

This class provides methods that are not part of the API of any

VirtualTree

This is a mixin class that can be used to allow for virtual tree