C
Chris Capel
Ok, so I have a ListBox. So it has these Items. These Items are of type
SummaryItem
class SummaryItem {
public SummaryItem(String prefix) {Prefix = prefix;}
public String Value;
public String Prefix;
public override String ToString() { return Prefix + Value; }
}
Nice, simple custom class. Now, I initialize a bunch of summary items at the
start of my form and add them to the ListBox. But when I change my Value
property, the ListBox isn't updated. That's expected, but I don't know how
to update it. What's the best way? Short of taking out the item and putting
it back in, that is.
Chris
SummaryItem
class SummaryItem {
public SummaryItem(String prefix) {Prefix = prefix;}
public String Value;
public String Prefix;
public override String ToString() { return Prefix + Value; }
}
Nice, simple custom class. Now, I initialize a bunch of summary items at the
start of my form and add them to the ListBox. But when I change my Value
property, the ListBox isn't updated. That's expected, but I don't know how
to update it. What's the best way? Short of taking out the item and putting
it back in, that is.
Chris