I have a combo with DropDownSearchMethod = Default. As the user types, the combo does a search on the user's text. Characters typed by the user are unselected, characters matched by the combo are selected. How do I access the unselected text in the box?
The combo.TextBox.Text property is the complete text; user entered and searched. SelectedText = "", SelectionStart = the last character and SelectionLength = 0. Not very helpful!
The SelectionStart and SelectionLength properties of the TextBox describe the text selection. In the case where SelectionStart = 0, the unselected text is the substring between (SelectionLength - 1) and (Text.Length - 1). When SelectionStart > 0, you will have two strings, (0 to SelectionStart to SelectionStart) and ([SelectionLength - SelectionStart] to Text.Length - 1).