Windows Develop Bookmark and Share   
 index > Windows Forms General > AutoCompleteCustomSource contains / characters
 

AutoCompleteCustomSource contains / characters

Hi,

I have a TextBox with AutoCompleteCustomSource

1. My AutoCompleteStringCollection contains a list of companiesand other names (upwards of 20k items) that on occasion contain a '/ chjaracter. The AutoComplete functionality seems to stop when it reaches this character. Can this behaviour be changed to specify a different separator ie a character I know isn't used !! ?

2. Is there any way of restricting the entry in a TextBox with AutoCompleteCustomSource to the items in the list ? (Similar to a ListBox or ComboBox)

3. Can the drop-down be automatically(programmatically) resized ?

FilthyZombie

FilthyZombie  Monday, December 08, 2008 3:22 PM
You are running into the limitations of the AutoComplete feature:

1) It was originally designed as the autocomplete source for Internet Explorer. There are hardcoded assumptions about the type of content, / is unfortunately treated specially. There is no option available to override that.

2) No. Hard to do, considering TextBox allows the user to type anything she wants. You could use the Validating event to verify it the text matches the list contents.

3) No.


nobugz  Monday, December 08, 2008 3:48 PM
You are running into the limitations of the AutoComplete feature:

1) It was originally designed as the autocomplete source for Internet Explorer. There are hardcoded assumptions about the type of content, / is unfortunately treated specially. There is no option available to override that.

2) No. Hard to do, considering TextBox allows the user to type anything she wants. You could use the Validating event to verify it the text matches the list contents.

3) No.


nobugz  Monday, December 08, 2008 3:48 PM

You can use google to search for other answers

Custom Search

More Threads

• Printing RTF and HTML document with custom header and footer
• ASync webservice call
• make the text bigger
• lstguess.Items.Remove problem
• DataGridViewCheckBoxColumn in a DataGridView
• Single solution file or many?
• Combobox autocompletion issues
• exception.....
• Accessing external windows form components through windows application (Screen Scraping for Windows Application)
• show time