文本列表导入Combox

procedure TForm1.Button1Click(Sender: TObject);
var
  s:string;
  List: TStringList;
begin
  List:=TStringList.Create;
  s:=ExtractFilePath(Application.EXEName)+'123.txt';
  List.Sorted:=true;
  List.Duplicates:=dupIgnore;
  List.LoadFromFile(s);
  ComboBox1.Items.Assign(List);
  //ComboBox1.Items.LoadFromFile(s);
end;
posted @ 2009-08-19 21:00  洪飞  阅读(126)  评论(0编辑  收藏  举报