How can I scale FmxGrid rows and columns?

Hi,

I'm using Rad Studio Tokyo, FMX UI Pack 3.6.3. I put a TMSFMXGrid inside a TLayout object. I'm trying to scale columns and rows in way that displays more or fewer rows and columns in the TLayout. When I use grid->Scale->X and grid->Scale->Y it reduces the size of everything and leave lots of empty space around the grid in the TLayout object:







If you use scaling in FMX, it scales the whole control, i.e. the control clientrectangle too, which is by design in the FireMonkey framework. If you want to change the column widths & row heights only, you would have to loop through columns / rows and change grid.ColumnWidths[colindex], grid.RowHeights[rowindex] proportionally.

Thanks Bruno.  I suspected I'd have to do that but FmxGrid has so many helpful functions I wanted to check for a shortcut.  I also adjusted grid->FontSizes for each cell.