Sounds like what you're adding to a combobox is a mutable object (i.e. it
state changes and as a result calling ToString() again will result in a
different string).

ComboBox is just a wrapper around the Windows combo box.  The Windows
combo box doesn't support objects, it's simply a collection of strings.
When you add an item to the ComboBox.Items property that's that ComboBox
does, adds a string to the combo box and keeps track of the index
associated with that object.  As such ComboBox works most effectively with
immutable objects.

The only way I know of to "update" the text in a ComboBox is to remove and
re-insert the object whose text has changed.  Wrapping that remove and
insert with BeginUpdate and EndUpdate may reduce flicker

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to