procedure TForm1.DrawGrid1DrawCell(Sender: TObject; Col, Row: Longint;
Rect: TRect; State: TGridDrawState);
var
vRow, vCol: LongInt;
begin
vRow := Row;
vCol := Col;
with Sender as TDrawGrid, Canvas do
begin
if (vRow = 0) or (vCol = 0) then
Font.Color := clBlack
else
Font.Color := clRed;
TextRect(Rect, Rect.Left, Rect.Top, Format('(%d,%d)', [vRow, vCol]));
end;
end;
|