Firemonkey GlobalUseGPUCanvas set to false causes text formatting issues


I am working on an application which explicitly sets GlobalUseGPUCanvas to true in order to use the graphics card to render the canvas. I am currently adding functionality to NOT set GlobalUseGPUCanvas to true if the machine’s graphics card is not powerful enough to run the application.

However, I have noticed that when GlobalUseGPUCanvas = false, text in all of my TGrid cells are aligned to the right of the cell, as opposed to the left of the cell where I intend them to be. When GlobalUseGPUCanvas is set back to true, this behavior does not happen, and the text displays aligned to the left of it’s cell as intended.

What is actually going on with the way the canvas is rendered that could cause this? What can I do to prevent this from happening?

Edit: Here is the code which sets a text column’s alignment to left for my custom grid control which inherits from TGrid

void __fastcall TFmGrid::AddTextColumn( String Title, int Width )
TFmTextColumn * Col = new TFmTextColumn( this, FRowObjects );
Col->Header = Title;
Col->Width = Width;
Col->Align = TAlignLayout::Left;

AddObject( Col );

This code is definately being executed, but for some reason the left alignment is being ignored when GlobalUseGPUCanvas is not set to true.

Comments are closed.