Author Topic: search for an analog of SelChanged to re-select an item in the tree  (Read 108 times)

0 Members and 1 Guest are viewing this topic.

ATP

  • Mosquito
  • Posts: 2
Hello!

Sorry in advance for my English. I hope you can understand my question.

I tried for a long time to find a solution to the problem with the selection of tree elements, but I never found a 100% solution for myself. I would like to repeatedly select the same tree element. One solution is to use the Clicked event. But unfortunately, this also works if you click expand/collapse. It might be a good solution to use the SelChanged event, but it only fires once when a new element is selected. Maybe there is an analog of SelChanged for re-selecting a single element?


owenwengerd

  • Bull Frog
  • Posts: 444
Re: search for an analog of SelChanged to re-select an item in the tree
« Reply #1 on: April 30, 2021, 11:33:03 PM »
You could try to immediately unselect the clicked item during your Clicked handler (e.g. by selecting its parent). If the item is unselected, a successive click should presumably raise the Clicked event again.

ATP

  • Mosquito
  • Posts: 2
Owen Thanks for your advice, but I've already tried this and this method doesn't completely solve my problem.
If I remove the selection and switch to the parent element, then in my case the node will collapse.
Of course, I can disable collapsing for a while, but the visual effect of the last selected item is lost, which is not exactly good for the user.
Owen, could you add an additional event handler for the tree, if possible, to re-select an element similar to SelChanged, for example "Selection"?

Sorry Owen that I will ask one question off-topic. My application works in AutoCAD, Bricscad and ZwCAD, but now the number of users who ask for nanoCAD support is growing. Is it possible to add nanoCAD support to OpenDCL and how long can it take?

Owen I would like to thank you very much for your hard work in the development of Opencl and hope that you will not lose the desire to develop this product in the future. Thank you so much, you are the best!!!

owenwengerd

  • Bull Frog
  • Posts: 444
I appreciate your kind words, thank you. As for nanoCAD, as far as I'm aware it does not support the ARX UI control classes. If it ever does support all the needed classes I would certainly consider adding support for it, otherwise it is not feasible.

You can submit a feature request for some way to support your use case, but I would not give up just yet on finding a workaround. Perhaps someone else can provide some advice or suggest a completely different approach.