Ticket #4024 (closed defect: outdated)
wxTreeCtrl with single selection, selects more then 1 item
|Reported by:||g00fy||Owned by:|
wxTreeCtrl -> just the default sample.
Please apply the attached patch.
I think this is an MSW bug, because the API-calls return all success (like they should do, but they don't do it).
Now what don't they do?
The attached patch will select the rootitem when creating the tree. Upon selchange, it will expand the selected item.
This works nice for the rootitem, but if you select another item, you notice that the selection of the rootitem is not moved.
Also when you do GetSelections(), you get "2" as a result. Very weird indeed under a tree with the wxTR_MULTIPLE NOT set...
Solving this can be done with selecting the rootitem again, and selecting the other element...