I’ve been using HyperTreeList
from agw
but I’ve noticed that not all of the methods from wx.TreeCtrl
are implemented in wx.lib.agw.hypertreelist.HyperTreeList
and wx.lib.agw.customtreectrl.CustomTreeCtrl
. I’ve made a list of the missing methods.
Some of them are easy to implement in HyperTreeList
, since they have already been implemented in CustomTreeCtrl
. These methods are:
SetItemData
GetItemData
IsVisible
These can be implemented in HyperTreeList
just by adding them to the _method
list in hypertreelist.py
.
The rest need to be implemented in CustomTreeCtrl
first. These are:
CollapseAll
CollapseAllChildren
GetItemState
SetItemState
ClearFocusedItem
GetFocusedItem
SetFocusedItem
EnableBellOnNoMatch
EndEditLabel
IsEmpty
SelectChildren
UnselectItem
I’ve made a start by implementing CollapseAll
and CollapseAllChildren
, based on the existing ExpandAll
and ExpandAllChildren
methods, and these seem to work as expected.
The required changes can be seen here: https://github.com/domdfcoding/Phoenix/commit/17369dba9db5340f4933159dcfefba43df2e464c
I’ll see if I can implement some more of the methods before submitting a pull request. Some of these methods might not actually need implementing because of some quirk in how CustomTreeCtrl
and HyperTreeList
work that I’m not aware of, so I’d appreciate feedback.