ComboBox.Items.Add() moves cursor

  • Thread starter Saso Zagoranski
  • Start date
S

Saso Zagoranski

I posted a similar message before but perhaps I didn't explain enough what
the problem is...

I add items to the combobox during runtime depending on what the user
types...
the problem is that everytime the user types something (and I add items to
the combobox) the
cursor is moved to the left side of the combobox, like this:
|a
|ba
|cba
Instead of abc, I get cba...

the same thing happens if I use the ComboBox.AddItemsCore(...) method

What I want to know is, whether it is possible to stop the cursor from
moving backwards...

Sorry for the second post

Saso
 
S

Saso Zagoranski

Either I'm the only one with the problem, or nobody knows the solution...

Here's what I found... It's not a good solution but at least it works...
I capture the onKeyPress event and add the pressed key to the text in the
comboBox...
and then I fill the comboBox with new data... the cursor is still at the
begining but at least it works :)

Better solutions perhaps?

Saso
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top