Board index » delphi » Add multiple entries to combobox?

Add multiple entries to combobox?

How can I add multiple entries to a combobox, in 1 line of code?
 

Re:Add multiple entries to combobox?


Quote
John Lang wrote:
> How can I add multiple entries to a combobox, in 1 line of code?

ComboBox.Items.Text := ComboBox.Items.Text + 'Another line'#13#10'A
second line'#13#10'A third line';

If your new entries are already in a TStrings object, then you can use
ComboBox.Items.AddStrings.

--
Rob

Other Threads