1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| procedure TForm1.FormCreate(Sender: TObject);
var
iRow : Integer;
begin
with SG1 do begin
ColCount := 1;
RowCount := 5;
FixedCols := 0;
FixedRows := 0;
AutoFillColumns:= True;
Cells[0,0] := 'Zzzzzzzzzzzz';
Cells[0,1] := 'Sansnom1 - Copie.odt';
Cells[0,2] := 'Sansnom1 - Copie.txt';
Cells[0,3] := 'Aaaaaaaaaaaa';
Cells[0,4] := 'Sansnom1.odt';
SortOrder:= soAscending;
SortColRow(True,0);
end;
with SG2 do begin
ColCount := 2;
RowCount := 5;
FixedCols := 0;
FixedRows := 0;
AutoFillColumns:= True;
Cells[0,0] := 'Zzzzzzzzzzzz';
Cells[0,1] := 'Sansnom1 - Copie.odt';
Cells[0,2] := 'Sansnom1 - Copie.txt';
Cells[0,3] := 'Aaaaaaaaaaaa';
Cells[0,4] := 'Sansnom1.odt';
for iRow := 0 to RowCount -1 do
Cells[1,iRow] := ChangeFileExt(Cells[0,iRow],'');
SortOrder:= soAscending;
SortColRow(True,1);
end;
with SG3 do begin
ColCount := 2;
RowCount := 5;
FixedCols := 0;
FixedRows := 0;
AutoFillColumns:= True;
Cells[0,0] := 'Zzzzzzzzzzzz';
Cells[0,1] := 'Sansnom1 - Copie.odt';
Cells[0,2] := 'Sansnom1 - Copie.txt';
Cells[0,3] := 'Aaaaaaaaaaaa';
Cells[0,4] := 'Sansnom1.odt';
for iRow := 0 to RowCount -1 do begin
Cells[1,iRow] := StringReplace(Cells[0,iRow],'.','a',[rfReplaceAll]);
Cells[1,iRow] := StringReplace(Cells[1,iRow],' ','b',[rfReplaceAll]);
end;
SortOrder:= soAscending;
SortColRow(True,1);
end;
end; |
Partager