Results 1 to 3 of 3

Thread: Textbox autocomplete

  1. #1

    Thread Starter
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Textbox autocomplete

    Next problem.

    I have a textbox that autocompletes from a dynamic custom autocompletesource.
    It works, but only if the entered text is at the beginning of a autocomplete item.

    So I enter "abc".
    The autocompletelist contains "abcd", "defabc".
    What it does now is only show the first item.
    What I want it to do is to also show the second item.

    What would also work is it to show the complete custom autocompletelist, because I already filtered it myself.

    I've searched around the net, and it seems there is no 'good' way to do it.
    Most suggestions go for making a custom control, which I might, but would wouldn't prefer.

    Does anyone here by any chance know a fancy hack to fix this?

    Thanks
    Delete it. They just clutter threads anyway.

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Textbox autocomplete

    Set the TextBox.AutoCompleteMode to Suggest

    From MSDN

    Displays the auxiliary drop-down list associated with the edit control. This drop-down is populated with one or more suggested completion strings.
    Please mark you thread resolved using the Thread Tools as shown

  3. #3

    Thread Starter
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Textbox autocomplete

    Yes I had that working.

    Example:
    Name:  autocomplete.png
Views: 147
Size:  2.8 KB
    This works.

    If I'd change the autocomplete list to something like:
    Description 1 - 0000111
    Description 2 - 0000121
    Description 3 - 0000131
    etc.
    And enter 0000, I would like it to show the list, but it doesn't as none of the list items start with 0000.

    I know it's not designed to function that way, but is there any override for it to work like that?
    Delete it. They just clutter threads anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width