TTMSFNCGrid: Style partially applied when AdaptToStyle is True

This was observed while migrating a grid from TMS FMX UI Pack to its FNC counterpart:

  1. On a blank FMX project drop a TStyleBook and a TTMSFNCGrid
  2. On the TStyleBook load the FMX style that ships with RAD Studio
  3. Assign the TStyleBook to the StyleBook property of the main Form
  4. On the TTMSFNCGrid check the AdaptToStyle property

While the header cells have the right colors the normal cells still have the default background color.


You can disable banding & the default background for the cells with the following code:

  TMSFNCGrid1.UseColumns := False;
  TMSFNCGrid1.AdaptToStyle := True;
  TMSFNCGrid1.Appearance.NormalLayout.Fill.Kind := gfkNone;
  TMSFNCGrid1.Options.Bands.Enabled := False;

Which should give you the desired result.

Thanks. This works as intended now and luckily banding is not essential for our grids now, but support for it will be awesome as it worked well for TMS FMX UI Pack grids.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.