This project is read-only.

Disabling multi-selection?

Jul 22, 2013 at 4:08 AM

I'm using the TreeViewEx control in my project for several tools. Most of them require multi-selection so this is perfect for me. However, one of them must disallow multi-selection and I think there is no way to disable it.

It would be very handy to be able to disable it, so I can still use this control in this particular case and benefit its other advantage.
Jul 22, 2013 at 6:46 AM
Try the onselection event of the treeview control. There you can cancel selection.
Jul 22, 2013 at 7:35 AM
Oh, that works pretty well, thank you :)

However, I can still draw the selection rectangle, it could be nice to be able to disable it as well.
Jul 22, 2013 at 7:52 PM
I see. The OnSelection event was meant to decide for some items, if they are allowed to be selected. You want to disable selection completely. I will have to implement that.
Jul 23, 2013 at 3:49 AM
I still want to have single item selection by simple clicking. I saw in the source that there is a SelectionMultiple class which is currently the one used, and a stub of an unimplemented SelectionSingle class. That would be a good solution, having a bool to enable/disable multi selection by switching the InputSubscriber to use.
Jul 26, 2013 at 11:23 AM

doing that was the plan, but this feature was not requested until now. Maybe you want to implement the single selection strategy? My first goal is to refactor the multiselection strategy.
Jul 29, 2013 at 6:22 AM
Yep, I can do that, but it's a low priority for me now.
I will probably give a try in a few weeks when I'm done with the main features of my tools.
Oct 13, 2013 at 7:22 AM
Also, visual studio solution explorer style selection would be great. You can do multiselection by shift and ctrl keys, but not with mouse alone (no selection rectangle).