1 2 3 4 5 6 7 8 9 10 11 12 13 14
| procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if not MergedCells(StringGrid1,ACol,ARow,1,0,nb_fleche,0,State)then
if not MergedCells(StringGrid1,ACol,ARow,nb_fleche+1,0,nb_fleche+1,1,State)then
if not MergedCells(StringGrid1,ACol,ARow,nb_fleche+2,0,nb_fleche+2,1,State)then
StringGrid1.Canvas.TextRect(Rect, Rect.Left+2, Rect.Top+2, StringGrid1.Cells[ACol,ARow]);
if (ACol=0) and (ARow=1) then Stringgrid1.Canvas.Font.Size:=10;
if (ACol=1) and (ARow=0) then Stringgrid1.Canvas.Font.Size:=10;
if (ACol=nb_fleche+1) and (ARow=0) then Stringgrid1.Canvas.Font.Size:=10;
if (ACol=nb_fleche+2) and (ARow=0) then Stringgrid1.Canvas.Font.Size:=10;
end; |
Partager