小新吧 发表于 2014-12-10 02:29:49

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]
查看完整版本: delphi drawgrid单元格颜色改变,点击后又消失了,代码如下