TreeListCtr SelectionChange event

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
TsysarAndrew
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 03, 2018 7:34 am

TreeListCtr SelectionChange event

Post by TsysarAndrew »

I have the following problem. On an example of a TreeListCtr with the following structure:

Code: Select all

root
  item 1
  item 2
  item 3
  item 4
  item 5
I select elements "item 1", "item 2", and "item 3" sequentially with the Shift key pressed. Each time the SelectionChange event is generated. As result, there are 3 selected elements in the tree. Next, I release the Shift key and select "item 2". As result, in the tree one item is selected, and the SelectionChange event is not generated. Tell me, is this a mistake or not? Is it possible to work around this problem?

ps: i use wxWidgets-3.1.0, Windows
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: TreeListCtr SelectionChange event

Post by doublemax »

I don't see this problem in the "treelist" sample. It generates a selection event as expected. Can you check that on your system?
Use the source, Luke!
TsysarAndrew
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 03, 2018 7:34 am

Re: TreeListCtr SelectionChange event

Post by TsysarAndrew »

On my system, the behavior of wxTreeListCtrl from the "treelist" sample is similar. I also looked at the "listctrl" sample, there on the last step from my chain of actions class wxListCtrl generates an event EVT_LIST_ITEM_DESELECTED, which is not in the class wxTreeListCtrl.
TsysarAndrew
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 03, 2018 7:34 am

Re: TreeListCtr SelectionChange event

Post by TsysarAndrew »

I think it's not a bug, it's a future.
I revised my logic, and I managed to get around the described problem.
Post Reply