FMX.Grid.TColumn.CellControlByRow 函数

FMX.Grid.TColumn.CellControlByRow function

我尝试从 TeeChart 9 为 XE10 编译文件 FMXTee.Chart.Grid.pas,该文件使用 FMX.Grid.pas 中的 CellControlByRow 函数用于以下代码:

with TColumnAccess(Columns[Col]).CellControlByRow(Row).BoundsRect.BottomRight do begin ... end;

我在使用 RAD XE10 Seattle 时 运行ning 很好,现在我尝试使用 RAD XE10.1 Berlin 但收到错误消息:[dcc32 Error] FMXTee.Chart.Grid.pas( 1507): E2003 未声明的标识符: 'CellControlByRow'

然后我比较了 XE10 包中的文件 FMX.Grid.pas 和 XE10.1 包中的 FMX.Grid.pas,有很多不同之处,尤其是 CellControlByRow() 函数在 [=27 中不再存在=] 来自 XE10.1.

现在,我想问一下如何更改使用 CellControlByRow 函数的代码,以便在 RAD XE10.1 Berlin 中 运行?

我建议您替换下面的代码:

result:=TColumnAccess(Columns[Col]).CellControlByRow(Row).BoundsRect.BottomRight;

下一个:

...
  var tmp : TFmxObject;
  begin 
  tmp:=TColumnAccess(Columns[Col]).CellControl;
  result:=TControl(tmp).BoundsRect.BottomRight
...

以上代码应该可以解决您遇到的编译问题。你能证实吗?