With a ComboBox there are multiple properties and events that interact.
SelectedIndexChanged()
DropDownStyle
AutoCompleteMode
AutoCOmpleteSource
Now I have a static collection of Objects, that contain String Values as their names. I add those names in alphabetical order (and by way of the list creation numerical indicies as well) to the combobox.
DropDownStyle = DropDownList
In this mode, you cannot "edit" the text of the control, but you can type the 1st character in order to jump through the list. However, it doesn't allow you to type multiple characters to find the 5th item beginning with the letter "B"
Example
BHTY
BOLL
BORI
BTRE
TREE
If I type "B" then "T" it will first jump to BHTY in the list, and then to the TREE item in the list. This is not what I want.
DropDownStyle = DropDown
AutoCompleteMode = Append
AutoCompleteSource = ListItems
THis allows you to type into the text box control, and as what you type matches items currently contained within the list it will implicitly suggest the item closest matching the item you want.
Example
If I type "B" then "T" the text property will reflect "btRE" the "re" being still selected. Once I exit the control (or press <enter>) the event
SelectedIndexChanged() is fired. I want the Index to reflect exactly what is in the Text property as I Type. Thus I Type:
"B" -> BHTY is Selected, and the SelectedIndex = the Index of BHTY in the List Items.
"O" -> BOLL is selected, and the SelectedIndex = the index of BOLL in the List Items.
"R" -> BORI is selected, and the SelectedIndex = the index of BORI in the List Items.
Is there a way to effect this behavior in the default ComboBox with property settings or event handler, or do i have to write my own KeyDown() events in order to jump to the appropriate Item?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner