Board index » delphi » When ComboBox menu is down, focus doesn't switch

When ComboBox menu is down, focus doesn't switch

When a ComboBox's menu is dropped down, but no item is selected, it
seems to take two clicks to transfer focus to another control. This
happens in situation's as simple as 1 combobox and 1 button on a form.

1. Am I crazy?
2. Am I missing something?
3. If  those two questions return 'no' then
      How do I fix it so that focus is switched on one click?

TIA, Chuck Burkins
cburkins (at) pobox (dot) com

 

Re:When ComboBox menu is down, focus doesn't switch


Quote
Burk wrote:

> When a ComboBox's menu is dropped down, but no item is selected, it
> seems to take two clicks to transfer focus to another control. This
> happens in situation's as simple as 1 combobox and 1 button on a form.

> 1. Am I crazy?
> 2. Am I missing something?
> 3. If  those two questions return 'no' then
>       How do I fix it so that focus is switched on one click?

> TIA, Chuck Burkins
> cburkins (at) pobox (dot) com

Will the property "CloseUp" do what you need?

Ex:

procedure TForm1.ComboBox.OnClick(Sender : TObject);
begin
 ComboBox.CloseUp;
end;

Hope it helps!

Rkr
--

          \|||/
          /'^'\
         ( 0 0 )
-----oOOO--(_)--OOOo----------
Reid Roman
E-Mail : rkro...@pacbell.net
Delphi Enthusiast, Hobbiest ..
U.S.A
------------------------------

Re:When ComboBox menu is down, focus doesn't switch


Quote
Reid Roman <rkro...@pacbell.net> wrote:
>Burk wrote:

>> When a ComboBox's menu is dropped down, but no item is selected, it
>> seems to take two clicks to transfer focus to another control. This
>> happens in situation's as simple as 1 combobox and 1 button on a form.

<snippage>

Quote
>Will the property "CloseUp" do what you need?

Can't find CloseUp as a property for TComboBox, but I tried
DroppedDown. It didn't seem to work.
You know what's really annoying? Now I seem to have fixed it, but I'm
not sure how, perhaps by setting ComboBox.ItemIndex:=-1 OnExit.

Thanks for your help anyway.  -Chuck

p.s.  Does the Delphi Enthusiast, Hobbiest, mean that you program for
fun, instead of as you steady job? Is this common? I seem to have
stumbled into programming as a hobby and I'm wondering just how loony
I am.  

Banging my head against a program and loving it...
-Chuck    
cburkins (at) pobox (dot) com

Quote
>          \|||/
>          /'^'\
>         ( 0 0 )
>-----oOOO--(_)--OOOo----------
>Reid Roman
>E-Mail : rkro...@pacbell.net
>Delphi Enthusiast, Hobbiest ..
>U.S.A
>------------------------------

Other Threads