ComboBox.Items.Add() moves cursor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Saso Zagoranski

    ComboBox.Items.Add() moves cursor

    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.AddIte msCore(...) method

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

    Sorry for the second post

    Saso



  • Saso Zagoranski

    #2
    Re: ComboBox.Items. Add() moves cursor

    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

    "Saso Zagoranski" <saso.zagoransk i@guest.arnes.s i> wrote in message
    news:bo37cg$i1q $1@planja.arnes .si...[color=blue]
    > 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.AddIte msCore(...) method
    >
    > What I want to know is, whether it is possible to stop the cursor from
    > moving backwards...
    >
    > Sorry for the second post
    >
    > Saso
    >
    >
    >[/color]


    Comment

    Working...