TTMSFMXGrid - alignment issue with AdaptToStyle

Horizontal alignment commands such as


have no effect on alignment after setting AdaptToStyle to True. Presumably, the style is overriding the setting. How might this be overcome?

I am using the styles from Embarcadero's Firemonkey Premium Styles Pack.


You cannot combine the column appearance settings with adapt to style. When AdaptToStyle is set to false you need to use the HorzAlignment properties directly, instead of the ones on column level.

  TMSFMXGrid1.HorzAlignments[1, 1] := TTextAlign.Center;

Kind Regards, 

Thanks for response. Did you mean "When AdaptToStyle is set to true..."? Unfortunately, AdaptToStyle = true seems to prevent the desired alignment whether or not the command is given at the column or cell level.

My apologies, When AdaptToStyle is set to true, you should be able to use the HorzAlignments properties. These properties are per cell, not per column.

Kind Regards, 

Please ignore the second part of my last post. Your suggestion DOES work.  The alignment can indeed be set at the cell level when AdaptToStyle is true. Thank you for your help.