Hello,
When a wxTreeCtrl is first created, by default it has no item selected. This
changes when the control receives focus, upon which if there is no item
selected, the root item is selected. Is there a way (i.e. a style/etc) to
change this behavior without receiving the focus event for the tree control?
It seems to me that the behavior for a tree control would not be to
automatically select an item if there is none selected.
This comes up because of Patrick O'Brien's awesome PyCrust package which,
for those of you who haven't used it, has a tree wherein selecting an item
causes its contents to be displayed in another window. But, the root object
may be a dictionary that has a large number of items, which if is
automatically displayed, causes the app to seem to hang for a few seconds
while it does its thing to display the contents. I can see needing to be
able to look at this by selecting it, so I wouldn't suggest a change in
PyCrust's behavior other than its automatic selection of the root. I've
patched my filling.py to accommodate this. I'll post my patch if anyone
(especially Patrick or Robin ) thinks this is a good/necessary change.
Thanks,
Jordan