取出代码:procedure TBuyOrder.cbJHDDDblClick(Sender: TObject);var txtlist:TStringList; i,m:integer;begin cbJHFS.Items.Clear; cbJHDD.Items.Clear; if FileExists(ExtractFilePath(Application.ExeName)+ 'jhdd.txt ') then begin txtlist:=TStringList.create; try txtlist.LoadFromFile(ExtractFilePath(Application.ExeName)+ 'jhdd.txt '); for i:=0 to txtlist.Count-1 do begin m:=pos(';',txtlist.Strings); cbJHDD.Items.Add(copy(txtlist.Strings,0,m-1)); cbJHFS.Items.Add(copy(txtlist.Strings,m+1,length(txtlist.Strings))); end; finally txtlist.Free; end; end else begin cbJHFS.Text:=''; cbJHDD.Text:=''; end;end;