Ticket #4024 (closed defect: outdated)
wxTreeCtrl with single selection, selects more then 1 item
| Reported by: | g00fy | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | wxMSW | Version: | |
| Keywords: | wxTreeCtrl | Cc: | g00fy |
| Blocked By: | Patch: | no | |
| Blocking: |
Description
wxTreeCtrl -> just the default sample.
Please apply the attached patch.
VS 2005/1
Win2K/4
CVS
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...
Greetz,
Steven

