A
Amil
I've added items to a listbox by calling ListBox.Items.Add(new MyObject()),
where MyObject has overridden ToString to show each item's display value.
I can't seem to change the DISPLAYED TEXT when I change the object behind
the selected index:
((MyObject)listbox.SelectedItem).mydisplayproperty = "abcdef";
The ListBox display doesn't change, but I know the object is changed since
other buttons that examine the contents of each listbox item see it changed
(and enable/disable their button state). How can I easily do this? I've
tried Refresh, Invalidate, Update methods on the listbox. No luck.
Amil
where MyObject has overridden ToString to show each item's display value.
I can't seem to change the DISPLAYED TEXT when I change the object behind
the selected index:
((MyObject)listbox.SelectedItem).mydisplayproperty = "abcdef";
The ListBox display doesn't change, but I know the object is changed since
other buttons that examine the contents of each listbox item see it changed
(and enable/disable their button state). How can I easily do this? I've
tried Refresh, Invalidate, Update methods on the listbox. No luck.
Amil