Hi,
Thanks for the reply.
I've got it working pretty well. I'm only displaying strings for the
suggestions, but their values are pulled from a database.
I've derived my own TextBox class that adds some events and properties to
make it a little easier (IMHO).
For example:
// This is an event handler in the host form:
private void pmdTextBox1_AutoCompleteListNeeded(object sender,
AutoCompleteListNeededEventArgs args)
{
string[] dummy = new string[] { "Apple", "Appalachian", "Appp",
"Appppppp" };
args.SourceList = dummy;
}
I will post the code later. It's become quite large as it's next to
impossible to do User Painting with a TextBox although there are ways... it
has made the code grow.
More info later,
Steve
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:Od**************@TK2MSFTNGP05.phx.gbl...
Hi,
Are you using asp.net ?
In a win app you would have to use another cntrol to hold the list of
items. I know that the framework does not provide anything like thta, you
should first try to google for a similar control or check a third party
control set (like infragistics) to see if they provide it.
"Steve K." <no***@nowhere.comwrote in message
news:uU**************@TK2MSFTNGP06.phx.gbl...
>>I want to have AutoSuggest based on a database (or webservice) query. So
as the user types say... a last name I will make an async call to a
service to get matches, then set the suggestion list at runtime.
I tried this quick by handling the key down event and building a "dumb"
Suggestion list and assigning to the TextBox control but it seem to lock
the control up from any additional text input and the autocomplete list
is not displayed.
Has anyone mananaged to put this feature of the TextBox to use beyond the
built is sources?