Hey there,
I'm using the TGridPanelLayout-Component with several Rows and Cols and each of them contains a TImage-Component that is meant to load a specific picture from its SQLite-DB. I've tested my approach for this in a small scale Firemonkey-application for windows and it worked fine. But as soon as I'm trying to use it within an iOS-App, I get a DDC-Error each time the deployment is about to start. My command for making the cast from TControl to TImage looks like this:
procedure TForm2.SpeedButton1Click(Sender: TObject);
var hCol,hRow : integer;
hImage : TImage;
begin
hCol := 0;
hRow := 0;
while hRow<5 do
begin
hImage := GridPanelLayout1.ControlCollection.ControlItems[hCol,hRow].Control as TImage;
hImage.Bitmap.LoadFromFile('C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg');
inc(hCol);
if(hCol > 1) then
begin
hCol := 0;
Inc(hrow);
end;
end;
end;