TheSwamp

Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: ATP on April 30, 2021, 06:35:11 PM

Title: search for an analog of SelChanged to re-select an item in the tree
Post by: ATP on April 30, 2021, 06:35:11 PM
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?

(https://acadtopoplan.ru/ATP/2021-05-01_00-25-07.png)
Title: Re: search for an analog of SelChanged to re-select an item in the tree
Post by: owenwengerd 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.
Title: Re: search for an analog of SelChanged to re-select an item in the tree
Post by: ATP on May 01, 2021, 05:19:26 PM
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!!!
Title: Re: search for an analog of SelChanged to re-select an item in the tree
Post by: owenwengerd on May 01, 2021, 09:43:33 PM
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 (http://"https://sourceforge.net/p/opendcl/feature-requests/") 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.