{
Assign, Add example
This example creates a stringlist, adds elements to it and adds the strings to a combo box.
}
var
  StringList: TStrings;
begin

  StringList := TStringList.Create;
  try
    with StringList do begin
      Add('This example uses A string List.');
      Add('It is the easiest way to add strings');
      Add('to a combobox''s list of strings.');
      Add('Always remember TStrings.Create method');
      Add('is abstract; So use TStringList.Create');
      Add('method instead.');
    end;
    with ComboBox1 do begin
      Width := 210;
      Items.Assign(StringList);
      ItemIndex := 0;
    end;
  finally
    StringList.free;
  end;
end;
 
