Hi dudes.
Hi dudes.
I'm not familiar with Firemokey, so I've got a problem in a very simple example with a grid and a centered rectangle on that: it works only in design time. The two pictures below show the project in design time and run time. As you can see, the green rectangle desapears in run time, but I want to show it. The source code of the example can be downloaded from my drive: https://drive.google.com/file/d/1HmEz79AOV4_yugxHnJwNJDibOjpye3Mg/view?usp=sharing .
So, what am I doing wrong?
Thank you!

I'm not familiar with Firemokey, so I've got a problem in a very simple example with a grid and a centered rectangle on that: it works only in design time. The two pictures below show the project in design time and run time. As you can see, the green rectangle desapears in run time, but I want to show it. The source code of the example can be downloaded from my drive: https://drive.google.com/file/d/1HmEz79AOV4_yugxHnJwNJDibOjpye3Mg/view?usp=sharing .
So, what am I doing wrong?
Thank you!

I have problems 10.2.2 build 2004 with TRectangles inside layouts that are broken (cannot set visibile to false, fail to align...). I guess that it could be a bug
ReplyDeleteI'm guessing that TGrid is not designed to have child controls (other than the grid columns). The solution would be to have a TLayout, to which the TGrid is parented, and the Align property of the TGrid set to Contents, then have another TLayout which also also parented to the first TLayout and Align set to Contents, then the Rectangle etc parented to that
ReplyDeletein my case it shows only an empty grid. 10.2.1
ReplyDeleteDavid Nottage gives a good idea. In a simpler way, you can, also, put the rect in the form and not inside the grid and adjust the position programmatically according to the position/size of the grid
ReplyDeleteDavid Nottage Thanks for the tip. But it works in design time, so it should work in run time too. Anyway, I'm going to put it in a panel, because I think it is a bug in Firemonkey.
ReplyDeleteGrid is diffrent at run time and design time. Use layout as a parent for geid and rectangle. Components has diffrence for design time and runtime sometimes.
ReplyDelete