
02.01.2012, 12:31
|
 |
Гуру
|
|
Регистрация: 09.03.2009
Адрес: На курорте, из окна вижу теплое Баренцево море. Бррр.
Сообщения: 4,723
Репутация: 52347
|
|
А вот так не хотите попробовать?
Код:
Var
Data,Row: TStringList;
R,C,i: Integer;
BeginRead: Boolean;
begin
StringGrid1.RowCount := 1;
StringGrid1.ColCount := 1;
StringGrid1.FixedCols := 0;
StringGrid1.FixedRows := 0;
Data := TStringList.Create;
R := 0;
BeginRead := False;
Data.LoadFromFile('C:\1\data.txt');
for i := 0 to Data.Count - 1
do if Pos('#Pole2',Data.Strings[i]) <> 0
then begin
BeginRead := True;
Continue;
end
else if BeginRead
then begin
Row := TStringList.Create;
Row.Text := StringReplace(Data.Strings[i],':',#13#10,[rfReplaceAll]);
if StringGrid1.ColCount < Row.Count then StringGrid1.ColCount := Row.Count;
StringGrid1.RowCount := R + 1;
StringGrid1.Rows[R] := Row;
Inc(R);
Row.Free;
end;
Data.Free;
end;
__________________
Жизнь такова какова она есть и больше никакова.
Помогаю за спасибо.
|