Feature addition
Add SetDragFullScreen and GetDragFullScreen methods which changes the
way the simplified drag/drop works in the tree. This flag is passed
to the wx.DragImage.BeginDrag() method when it is called.
Also add this option to HyperTreeList.
Modify the CustomTreeCtrl and HyperTreeList demos so it can be tested.
Feature addition.
Add SetColumnSortIcon() method to HyperTreeList so that a native sort
arrow can be easily shown in the header columns. For some reason does
not work on GTK (won't draw arrow) but works great on Windows/MacOS.
Modify the demo with LIST_COL_CLICK event options so it can be tested.
CustomTreeCtrl and HyperTreeList use wx.SYS_COLOUR_LISTBOX for their
default background colors. This defaults to dank Grey on MSW/GTK/MacOS
even though the TreeCtrl and ListCtrl on all three platforms default
to a white background. Use a trick from UltimateListCtrl to take
default colors from wx.ListCtrl.
This can be seen in the demos, except that the CustomTreeCtrl demo
forces its background to wx.WHITE. With these changes forcing the
background color is no longer necessary and allows the controls to
take on the native background color for themes that change it.
In CustomTreeCtrl and HyperTreeList the SetItemText method recalculates
the size of the item row in which the text was changed. If the number
of lines in the text changes the entire tree must be recalculated
as all items below must be shifted to compensate. This change attempts
to recalculate the entire tree only when necessary (when number of
lines change) in order not to slow down existing code that performs a
lot of SetItemText() operations on an unfrozen tree.
Add a "Change Item Text" option to the CustomTreeCtrl and HyperTreeList
demos so that this can be tested. Before this fix, changing the number
of lines of text in an item would leave gaps or create overlaps
between items in the tree.
The HyperTreeList demo receives events from an embedded TreeCtrl
window which reports a different item type (TreeItemId) than the
HyperTreeList events (TreeListItem). This throws an exception:
AttributeError: 'TreeItemId' object has no attribute 'GetText'.
Guard against this by only processing events with TreeListItem items.
To reproduce, start the HyperTreeList demo and expand "item 0-a" then
enable it by clicking the radio button. Selecting any item in the
ListCtrl, or expanding/collapsing a tree node will generate exceptions.
Hiding items was only partially implemented and very buggy.
This feature does not exist in CustomTreeCtrl but I see no reason why
it couldn't be added in the future. This fix requires the arrow key fixes
in order for arrow keys to work reliably in a tree with hidden items.
Hidden items always report they are disabled and not expanded.
Also updates the demo of HyperTreeList to add hide options to context
menu so the feature can be tested.