ComboBox AutoLookup behavior

Posted on 2005-04-25
Last Modified: 2010-04-05
Here's what we're experienceing in a part of our app written with Delphi 6:

In a TComboBox that has many items in its list, a user can jump directly to a selected item if they type in the text of the desired item **really fast**   This typicak "auotLookup" behavior really does work, but you've gotta type quickly.  As you might guess, we have annoyed users who complain that if they pause at all while keying in the desired "jump to" text, to combobox loses track of thier request:

Example:  user wants to do an "autoLookup" of list member RL357 in the comboBox

if user types in RL357 extremely fast without pausing...the combo finds RL357 just fine
if a user types in RL, then pauses for a split second, then types 357...the combo forgets about the RL and jumps to the items in the list the begin with 357 instead.

I'm hoping the TComboBox has some "window of typing time" setting that I can adjust, but I can't find anything like that.  Are we stuck with the 'fast-typing' workaround or can the combox be altered to accomodate slower typing during autoLookup?

Thanks for  your thoughts!
Question by:bohiggy
    LVL 15

    Expert Comment

    I understand this is a pain bohiggy, but I personally havent found any some of time property for the autocomplete.
    I hope someone has a work around for this issue as I would be interested too.
    LVL 11

    Accepted Solution

    Heres a solution, its not terribly elegant but it does work.

    put a timer on the form

    set the timer.enabled to false and the timer interval to the maximum amount of time you want your users to have between keystrokes

    create a form level variable
        FTyped: string;

    add this code

    procedure TForm1.Timer1Timer(Sender: TObject);

    procedure TForm1.ComboBox1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);


    LVL 17

    Expert Comment

    I can't seem to recreate this. what settings are you using in the combobox? e.g style and sorted. is the drop down list displayed when you do this or not.
    I'm just not getting it, it's working as expected

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now