0

I tried to compile file FMXTee.Chart.Grid.pas from TeeChart 9 for XE10 that used CellControlByRow function in FMX.Grid.pas for the following code :

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

I get running well when using RAD XE10 Seattle, and now I tried with RAD XE10.1 Berlin but get error message : [dcc32 Error] FMXTee.Chart.Grid.pas(1507): E2003 Undeclared identifier: 'CellControlByRow'

Then I compare file FMX.Grid.pas from XE10 packages versus FMX.Grid.pas from XE10.1 packages, and there are a lot of differences especially CellControlByRow() function does not exist any more in FMX.Grid.pas from XE10.1.

Now, I want ask how to change the code that use CellControlByRow function so it will run in RAD XE10.1 Berlin ?

Mike Torrettinni
  • 1,816
  • 2
  • 17
  • 47
Haykal HM
  • 31
  • 5

1 Answers1

0

I would like suggest you replace the code below:

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

For next :

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

The above code should fix the compilation problem you’re experiencing. Could you confirm that?

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Sandra Pazos
  • 843
  • 5
  • 10
  • Thanks Sandra for your suggestion, this succesfully. I change code from: **with {$IFDEF D17}TColumnAccess{$ENDIF}(Columns[Col]).CellControlByRow(Row).BoundsRect.BottomRight do** to : **with {$IFDEF D17}TControl{$ENDIF}(tfmxobj).BoundsRect.BottomRight do** – Haykal HM Aug 05 '16 at 09:05
  • Sorry **Sandra**, evidently I found next error : **[dccosx Error] FMXTee.Import.pas(894): E2003 Undeclared identifier: 'Grid'** in the following syntax : {$IFDEF FMX} (AComponent is TImageControl) or ((AComponent is TColumn) and (TColumnAccess(AComponent).Grid<>nil) and (TColumnAccess(AComponent).Grid is TStringGrid)) or (AComponent is TTextControl) {$ELSE} ...... This error around the **TColumnAccess** class like error before found in file **FMXTee.Chart.Grid.pas**. How to fixed this error? Thanks a lot. – Haykal HM Aug 09 '16 at 09:51