Hi all,
TreeMixin provides two classes that can be mixed in with one of the
tree controls available in wxPython:
- treemixin.VirtualTree creates a 'virtual tree' that can fill itself
by calling various callbacks, similar to a list control in virtual
mode.
- treemixin.DragAndDrop simplifies dragging and dropping of tree items
by taking care of the graphical part and calling the OnDrop method
when the user finishes the drop.
Both mixins can be used separately or together. See the demo for more info.
Feedback welcome!
Cheers, Frank
run.py (4.21 KB)
treemixin.py (17.9 KB)
TreeMixinDemo.py (8.19 KB)
TreeMixinTest.py (7.73 KB)
Pretty cool, thanks! I am checking this out for the DragAndDrop mixin as I think our current implementation is missing some details and it looks like this will handle everything. However when I added it as a mixin, I noticed all my HitTest calls were failing and saw that the Harmonizer overrides it and returns the column always. Is this expected that anyone using these has to change all their HitTest calls?
- Mike
···
-----Original Message-----
From: fniessink@gmail.com [mailto:fniessink@gmail.com]On Behalf Of Frank
Niessink
Sent: Sunday, February 11, 2007 4:45 PM
To: wxPython-users@lists.wxwidgets.org
Subject: [wxPython-users] TreeMixin v0.5
Hi all,
TreeMixin provides two classes that can be mixed in with one of the
tree controls available in wxPython:
- treemixin.VirtualTree creates a 'virtual tree' that can fill itself
by calling various callbacks, similar to a list control in virtual
mode.
- treemixin.DragAndDrop simplifies dragging and dropping of tree items
by taking care of the graphical part and calling the OnDrop method
when the user finishes the drop.
Both mixins can be used separately or together. See the demo for more info.
Feedback welcome!
Cheers, Frank
Good point. I guess that's a bit too much to expect. The reason I put
TreeAPIHarmonizer in there was to hide all these little differences
between TreeCtrl, TreeListCtrl and CustomTreeCtrl. To do so I
obviously had to pick the richest API of each method. I'll add some
customization to TreeAPIHarmonizer so that you can tell it which Tree
API to prefer, defaulting to the TreeCtrl API.
Thanks for testing!
Cheers, Frank
···
2007/2/12, Rooney, Mike (ext. 324) <mxr@qvii.com>:
Pretty cool, thanks! I am checking this out for the DragAndDrop mixin as I think our current implementation is missing some details and it looks like this will handle everything. However when I added it as a mixin, I noticed all my HitTest calls were failing and saw that the Harmonizer overrides it and returns the column always. Is this expected that anyone using these has to change all their HitTest calls?