delphi drawgrid单元格颜色改变,点击后又消失了,代码如下
function CellDraw:boolean;
var
myrect:TRect ;
begin
myrect := Form1.DrawGrid1.CellRect(2,2);
Form1.DrawGrid1.Canvas.Brush.Color := clred;
Form1.DrawGrid1.Canvas.FillRect(myrect);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
CellDraw;
end;
页:
[1]