Package wx :: Package lib :: Package mixins :: Module treemixin

[frames | no frames]

## Module 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.customtree.CustomTreeCtrl. They can be used together or separately.

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

Author: Frank Niessink <frank@niessink.com> License: wxWidgets license Version: 0.8 Date: 13 March 2007

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

Classes
`DragAndDrop` | This is a mixin class that can be used to easily implement dragging and dropping of tree items.
`ExpansionState` | This is a mixin class that can be used to save and restore the expansion state (i.e.
`TreeAPIHarmonizer` | This class attempts to hide the differences in API between the different tree controls that are part of wxPython.
`TreeHelper` | This class provides methods that are not part of the API of any tree control, but are convenient to have available.
`VirtualTree` | This is a mixin class that can be used to allow for virtual tree controls.

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:07:25 2007 | http://epydoc.sf.net