Results 1 to 10 of 10

Thread: Autocomplete only considers the 1st letter?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,653

    Autocomplete only considers the 1st letter?

    I enabled autocomplete for file paths, and was surprised to find it would stop autoappending after the second letter...

    Consider

    C:\aa123
    C:\ab123
    C:\ac123

    I would type C:\a and it would correctly append C:\aa123

    But, if I continue, and type C:\ab it doesn't append the rest.

    Is this the correct behavior? If not, any ideas for what's going on?

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Re: Autocomplete only considers the 1st letter?

    In which application did you turn auto-complete on? What does this have to do with vb6?

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Autocomplete only considers the 1st letter?

    Auto complete for a list often only uses the first letter. In your case the C If you hit C more than once it would cycle to the next item in the list. This is common on combo boxes. Web sites for example when I select my state I have to hit the W more than once to get it to go to WV.

  4. #4
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,418

    Re: Autocomplete only considers the 1st letter?

    How about "forcing" the ComboBox (if it is a ComboBox) to search for the Edit-content in the List?
    SendMessage with CB_FINDSTRING as constant

    https://docs.microsoft.com/en-us/win.../cb-findstring

    No idea how to do the partial selection inside the textBox-Part of the CB
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,653

    Re: Autocomplete only considers the 1st letter?

    It's not searching the combobox, it's an autocomplete for the file system.

    @Peter Swinkels, I have a shell browser control with a ComboBoxEx for a directory dropdown, with an option to be editable to type a path in, and the option to turn autocomplete on (the system autocomplete, with the IAutocomplete interface/CLSID_AutoComplete default implementation) for when you're typing a path.

  6. #6
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Re: Autocomplete only considers the 1st letter?

    @fafalone, I see. Thanks for clearing that up.

  7. #7
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Autocomplete only considers the 1st letter?

    Quote Originally Posted by fafalone View Post
    It's not searching the combobox, it's an autocomplete for the file system.
    Are you sure?

    Below you make reference to comboboxEx and a drop down. While have not used this method it would not surprise me if it works much like I described.

    @Peter Swinkels, I have a shell browser control with a ComboBoxEx for a directory dropdown, with an option to be editable to type a path in, and the option to turn autocomplete on (the system autocomplete, with the IAutocomplete interface/CLSID_AutoComplete default implementation) for when you're typing a path.

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,653

    Re: Autocomplete only considers the 1st letter?

    I'm sure. The combo doesn't even contain full paths, just display names.

    It's like the SHAutocomplete API.

  9. #9
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: Autocomplete only considers the 1st letter?

    I've never used it but;
    My reference for this would be https://www.vbforums.com/showthread....lete-interface where Autocomplete for the File System seems to be working as you would like.

  10. #10

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,653

    Re: Autocomplete only considers the 1st letter?

    Yeah that uses the same definition of the same interfaces as mine, so not sure where a difference could arise.

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