how to handle text change input in combobox

  • Thread starter Thread starter tomfox
  • Start date Start date
T

tomfox

I have a Combobox which I populate on Form1_load
Now I want the user to change the existing text of an item during
runtime by just changing the text of the selected item.
To detect the change I use the "ComboBox_TextUpdate" event
but when I try to get the changed text with
"ComboBox.SelectedItem.ToString()" method I still see the old text

what am i doing wrong

regards

Thomas
 
I have a Combobox which I populate on Form1_load
Now I want the user to change the existing text of an item during
runtime by just changing the text of the selected item.
To detect the change I use the "ComboBox_TextUpdate" event
but when I try to get the changed text with
"ComboBox.SelectedItem.ToString()" method I still see the old text

what am i doing wrong

When user changes the text in the combobox, it does not change any of
the combobox items. It just, well, changes the text in the input field
of the combobox. You can access the current text via the ComboBox.Text
property. If you want to make the changes be reflected in the items,
you'll have to write the synchronization code yourself.
 
Back
Top