TTMSFMXGrid Background


Is it possible to have a bitmap image as a background for the complete grid ?

I have created a grid containing various controls (eg TButton) in some of the cells. Some cells have no associated control.

I'd like to fill the grid background with a bitmap image loaded from a file (eg JPG, BMP, PNG etc).

I've tried the following :

Image1 is a TImage which was placed on the form, and an image was loaded at design time.

grid.Options.Borders.CellBorders := bNone; // hide the cell borders
grid.Fill.Bitmap.Bitmap := Image1.Bitmap;
grid.Fill.Bitmap.WrapMode := TWrapMode.TileStretch;
grid.Fill.Kind := TBrushKind.BitMap;

Program crashes when I try to assign the bitmap (1st statement above).

I can successfully have a solid background or a gradient, so I assume that I should be able to have a bitmap.


This is working as expected here

  TMSFMXGrid1.Fill.Bitmap.WrapMode := TWrapMode.TileStretch;
  TMSFMXGrid1.Fill.Kind := TBrushKind.Bitmap;

If you continue to have issues with this, please send us a sample that demonstrates this issue so we can investigate what is missing.