Get cursor position in combobox?

  • Thread starter Thread starter Becker
  • Start date Start date
B

Becker

I have a need to know in one of the keypress events, what position the
cursor is in. For example, as I position the cursor and type, I'd like to
know for each key I press where in the string of text in the combobox I am.
I didn't see anyway to do this.

Thanks,
Becker
 
Look at ComboBox.SelectionStart and ComboBox.SelectionLength.

By the way, if you're trying to build an auto-completion combo box, the
kind in which the selection changes as the user types, search for
autocompletion and combo box in this news group. There are several
examples posted here.
 
Hi Becker,

You may be able to do something with the SelectionStart property.
It should report the position of the last character entered.
 
Heh?

Anyone know why this message shows up now when I posted it some time ago
with no changes to the system time?
 
Back
Top