Event invoke from a tree control needs two clicks?

Started by architrave · 2008-08-29 21:40 UTC · 4 replies · SMF topic #413

I am using a dockable form with a tree control. I want to get one point from AutoCAD when I rigthclick on one item of the tree.

Everything works correct excep that I have to click twice (one for getting the focus on AutoCAD window and the second to select the point).

However if I try to do the same operation but using a button control there is no need of two clicks.

Can I avoid the double click when using tree controls.

I am using th 4.1.2.2 version

Thank you very much
Hello architrave & welcome to the team.
Try adding (dcl_SetCmdBarFocus) to your RightClick Event.
So Acad will take focus before you pick inside the window.
Or you can uncheck the "Keep Focus" property on your dockable form.
I had the EventInvoke property set to 1-Allow (Command ... ) and it did not worked.

However, (dcl_SetCmdBarFocus)  works perfectly.

Thank you very much.

author=BazzaCAD link=topic=413.msg1850#msg1850 date=1220047128 wrote:
Or you can uncheck the "Keep Focus" property on your dockable form.


OpenDCL 4.1 doesn't have that property .