Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Thread Tools Display Modes
Old 10-12-2004, 03:27 PM
Posts: n/a
Default Setting Focus on a DbLookupCombo ??

We have a data entry form in our app that upon clicking the ADD button populates needed fields and sets focus on the Payment Type field which is displayed in a wwDbLookupCombo.

Everything works great except I would like to allow my users to just start typing in the focused combo.
Such as: "c" would bring up the first word starting with "c". Which in this case is "Credit Card". "ch" would bring up "Check" and "ca" would bring up "Cash".

Now all this aready works in the combo IF the user types in "Alt-Down Arrow" to open the combo first.

Is there a way to activate the combo so that the user does not have to type in "Alt-Down Arrow" or click the combo before typing within it?

Thank You!
Reply With Quote
Old 10-12-2004, 11:19 PM
Eddy-B Eddy-B is offline
Senior Member
Join Date: Feb 2002
Posts: 1,467
Default RE: Setting Focus on a DbLookupCombo ??

I've tried what you said: i've created 2 simple database systems both with just 1 string field: one with 3 entries 'credit card'; 'check' and 'cash'; the other empty.

Now, if i create the program with the 2 databases linked to a DBLookupCombo typing 'ca' will popup cash (even without opening the drop-down box). So i don't see the problem....

I'm using C-Builder 5, which should be compatible with Delphi 6 i think.

If you can't get it to function, try using an OnKeyDown event to open up the selectionbox (using DBLookupComboBox1.DropDown).

good luck !


Please click Accept as answer if this helped
Reply With Quote
Old 10-13-2004, 10:18 AM
Posts: n/a
Default RE: Setting Focus on a DbLookupCombo ??


wwDBEditPurEntryPaymentType.DropDown; on the OnKeyDown event did the trick!

Thank You!
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:19 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.