小编Fin*_*ike的帖子

FillRect不会在Delphi XE2中绘制完整的TStringGrid单元格

FillRect不会TStringGrid在Delphi XE2中绘制完整的单元格.默认颜色左侧有3个像素的间隙(BiDiMode设置为bdLeftToRight).在我之前使用过的Delphi 6中不存在这个问题.

procedure TShapeline.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
begin
  Stringgrid1.Canvas.Brush.Color:=$00FF80FF;
  StringGrid1.Canvas.FillRect(Rect);
end;
Run Code Online (Sandbox Code Playgroud)

我试图更改所有属性(包括DrawingStyle)和不同的画笔样式,绘制的矩形不会填充整个单元格.

delphi tstringgrid delphi-xe delphi-xe2

15
推荐指数
2
解决办法
4927
查看次数

标签 统计

delphi ×1

delphi-xe ×1

delphi-xe2 ×1

tstringgrid ×1