Re: Can I implement an autofill feature with a textbox?
From: Warmrain (Warmrain_at_discussions.microsoft.com)
Date: 01/14/05
- Next message: thomasamillergoogle_at_yahoo.com: "winform - open up a NEW default browser window"
- Previous message: sickfish: "ApplicationContext and SaveFileDialog"
- Next in thread: corbinamman_at_gmail.com: "Re: Can I implement an autofill feature with a textbox?"
- Reply: corbinamman_at_gmail.com: "Re: Can I implement an autofill feature with a textbox?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 14 Jan 2005 11:49:03 -0800
As it turns out Greg Dunn's example using a combobox does NOT require you to
set the DroppedDown on entry and it DOES work with a Simple style combo. I
simply placed a single line high (textbox sized) combo on the form, set the
style to simple, filled the list with some test data (in the IDE) and then
ran the project.
I type some characters and hit the down arrow and get the closest match. If
the Sorted property is set to true then it work better when the first "hit"
isn't the correct one.
I'd like to see your example though...
Best, Steve
"Corbin" wrote:
> Greg,
>
> Thanks for the suggestion. I have tried it and again I am not getting
> the behavior that is desired. My problem with the combobox is that
> every other place where I use comboboxes, the DropDownStyle property
> is set to DropDownList, forcing the user to select an item rather than
> entering a value not on the list. To avoid confusion, I don't want to
> have some comboboxes that do enforce this and others that do not. So
> if I use a cbo, it has to at least look like a textbox. This can be
> achieved with a DropDownStyle set to Simple, but then even with your
> suggested code in the Enter event it does not attempt to auto-complete
> text as it is typed in or even when the cbo loses focus.
>
> Is it possible to implement some form of auto-completion with a cbo
> that is set to DropDownStyle=Simple? So far, I'm not having any luck.
>
> Thanks,
> Corbin
>
> "Greg Dunn" <newsgroups@gregdunn.com> wrote in message news:<O9Tvu5lnEHA.2612@TK2MSFTNGP15.phx.gbl>...
> > >> Am I even using the right control?
> >
> > A sorted ComboBox gets you pretty darn close to what you want with almost no
> > coding. If you set the DroppedDown property of the ComboBox to True in the
> > Enter event, then wherever your user lands in the ComboBox, the list is
> > dropped down automatically. Then typing any sequence of letters followed by
> > the DOWN ARROW selects the closest match in the list.
> >
> > Greg Dunn
> >
>
- Next message: thomasamillergoogle_at_yahoo.com: "winform - open up a NEW default browser window"
- Previous message: sickfish: "ApplicationContext and SaveFileDialog"
- Next in thread: corbinamman_at_gmail.com: "Re: Can I implement an autofill feature with a textbox?"
- Reply: corbinamman_at_gmail.com: "Re: Can I implement an autofill feature with a textbox?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|