Mike Lucek wrote: > What is the best way to update an object value in a combobox to another > value?
How did the values get into the combo box in the first place? Updating a value should be very similar to setting it. > For example, I have a list of controls that a user can change the > colour of. The controls are listed in a combo and the current colour is > associated with each item in the combo. If the user selects a control name > from the combo, it displays the current colour of the control. If the user is selecting items in the combo box based on the name of a control, then the combo box is displaying the names of the controls, not their colors. Are you saying that once the user makes a selection, the combo box stops displaying names and starts displaying colors instead? That's awfully confusing. > If the user > changes the colour, how can the object value in the combo be updated to the > new colour value? Combo boxes holds lists of strings. Those strings can have TObject references associated with them. This works just like a TStringList, which has both Strings and Objects array properties. They work the same way because both the combo-box item list and TStringList descend from TStrings. I'm not really sure what you're trying to do, but does this additional information about the nature of combo boxes' storage help? -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

