|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Autocomplete textboxI'm looking for ideas on implementing a textbox with autocomplete functionality, just like the one found in Excel. As the user types values into the textbox a lookup for matching values is performed. For example lets assume that the user types the character '1' and that the candidate values are '01', '02', '03', '10', '12' etc. I need the textbox to display the first candidate value that partially matches the characters typed ('01'). The cursor should be located at the end of the user typed value (1|0) and the rest of the text must be selected. As the user goes on typing, the selected text is replaced with the typed character and the lookup is performed again. I am very close. I use the Textbox.SelectionStart and Textbox.SelectionLength properties but the problem is that the caret is allways placed at the end of the selection when I need it to be located at the begining. Any Ideas? Thanks! PS: I cannot use a combobox!
Other interesting topics
Tactics for Debugging Custom Components with CodeDom Serialized State
Auto Complete/Suggest (On Steroids) Newbie User Interface hangs in multi-thread app Two values for combo box ComboBox and Tab character '\t' 'DisplayMember' is not a member of 'System.Windows.Forms.ListView'. code clean up ComboBox: How can I limit user to list items? Generic windows error message Security Model |
|||||||||||||||||||||||