5,392
社区成员
发帖
与我相关
我的任务
分享
var
list:TStringList;
i,j:Integer;
begin
j := 1;
list := TStringList.Create;
list.LoadFromFile('c:\1.txt');
for i := 0 to list.Count - 1 do
begin
if list.Strings[i] = 'BLIST' then
j := 2;
if (j = 1) and (list.Strings[i]<>'ALIST') and (list.Strings[i]<>'') then
begin
CheckListBox1.Items.Add(list.Strings[i]);
end
else if (j=2) and (list.Strings[i]<>'BLIST') and (list.Strings[i]<>'') then
begin
ComboBox1.Items.Add(list.Strings[i]);
end;
end;
list.Free;
end;