Focus remains in combobox - modeless Dialog

Started by Marco Jacinto, September 25, 2007, 07:38:31 AM

Previous topic - Next topic

Marco Jacinto

I have a modeless dialog with two controls, a combobox and a Graphicbutton, when I press the button, the focus passes to drawing screen, but when I do the same with the combo, the focus remains in the control. I have the EventInvoke property equal in both controls (1), I try changing this value to 1 or 0 with no success, I try changing this value in the form also.

So my question is:
How can I send the focus to the drawing area when I select an item in the combobox?

TIA

Saludos
Marco Jacinto

owenwengerd

Quote from: Marco Jacinto on September 25, 2007, 07:38:31 AM
...when I press the button, the focus passes to drawing screen, but when I do the same with the combo, the focus remains in the control.

Controls that can accept keyboard input do not automatically hand focus back to AutoCAD when the mouse leaves the form, otherwise it would be difficult to enter keyboard input for those controls. In the case of combo boxes, you could try handling the OnSelChanged event and set focus back to AutoCAD in that event handler by calling the (dcl_SetCmdBarFocus) function.

Marco Jacinto

thanks Owen, your suggestion solves the problem.

Saludos
Marco Jacinto