I have a MultiColumnComboBox which gets populated on FormCreate with several hundred items. Works great. Other forms will require same selection with MultiColumnComboBox with same items. Instead of populating each MultiComboBox on every form with same items, is it possible to populate a TStringList once with the items and then somehow assigning it to each MultiColumnComboBoxt on FormCreate?
Something like mCombo1.Items.Data:= StrListProducts;
Thanks for your reply. I already use the component successfully with AddRow: In the OnCreate event of the form, I loop through a dataset and add the hundreds of rows to the MultiColumnComboBox with AddRow('Column 1;Column 2;Column 3'). My inquiry has to do with efficiency.
Since I will use a MultiColumnComboBox component with EXACT SAME CONTENT in many forms, I want to AVOID doing on every OnCreate of these other Forms the looping of hundreads of items of the same dataset to add same rows to the MultiColumnComboBox.
My question is if I can loop through the dataset ONCE when program starts and fill a TStringList variable with the rows content, and then assign this TStringList variable to a property of the MultiColumnComboBox directly on each OnCreate where such a component is used, without having to loop through the items row by row every time.
Somewhat similar to what can be done with a ComboBox:
ComboBox1.Items.BeginUpdate;
ComboBox1.Items.AddStrings(StringListItems);
ComboBox1.Items.EndUpdate;
In this manner, I loop once and assign the whole content with one instruction in each form where such a MultiColumnComboBox is used.
Is this possible? Best regards.