[issue] ComboBox always catch focus first.

Started by colder, December 13, 2007, 05:04:42 PM

Previous topic - Next topic

colder

Add a dockable form. Set "DockableSides" = "1 - Top Only".
Put the Combo Box in form.

The form show under toolbar. At this time, many command in toolbar can not exec. Because if you click button in toolbar, and then the mouse moveover dockable form. Combo Box will catch focus and command will abort!

Here is a picture show that. There is a simple project in attachments.

By the way, if Combo Box can support mouse wheel, that is perfect.



[attachment deleted by admin]

BazzaCAD

What if you add (dcl_SetCmdBarFocus) at the end of CboBox OnSelChanged event?
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

colder

Thanks for your answer!
A good function.

If I click the combo box. But do not change it. Only dropdown and close. "OnSelChanged" event is not firing.

owenwengerd

The only real solution to this problem is to add a new 'KeepFocus' property to dockable (and modeless) forms to control this behavior.

The purpose of the behavior is to capture the input focus for controls that accept keyboard input so that typed input continues to go to the control even if the mose leaves the form.  This happens for any control that can accept keyboard input (combo controls accept the arrow keys, space bar, and enter key).  Normally this is desirable, but obviously in this case it is not.