How to set text alignment for a specific column in firemonkey TGrid/TStringGrid?


In firemonkey (RAD Studio 10.3), I am working with a TStringGrid connected to a database and I want to change the text alignment of a specific column. How can I do that? Changing HorzAlign in TextSettings property, changes the alignment of all columns.

I tried the suggested solution in this page and did not work! In newer versions of Firemonkey the below solution code results in an error.

type TSpecificColumn = class(TColumn)
function CreateCellControl: TStyledControl;override;

There is no CreateCellControl function in TColumn Class anymore to be Overrided! This is the error I got:

Method CreateCellControl not found in base class.

Comments are closed.