var CurCol,CurRow:integer;//用与记录当前行、列
procedure TfrmMain.DrawGridMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
TDrawGrid(Sender).MouseToCell(X, Y,CurCol,CurRow);
end;
procedure TfrmMain.DrawGridDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
Text:String;
begin
with Sender as TDrawGrid do
begin
//ImageList1.Draw(Canvas,Rect.Left,Rect.Top,图形序号数组[ACol,ARow]);
Canvas.Ellipse(...);//画圆
Canvas.Rectangle(...);//画方
Canvas.Font.Size:=9;
Canvas.Font.Color:=clBlue;
Text:='要写的字';
Canvas.TextOut(Rect.Left,Rect.Top,Text);//写字
end;
end;