Hi all,
I'm struggling with getting fixedfont sizes to work right via code in TAdvStringGrids. This is hampering my ability to convert my app to use high DPI awareness and themes. I hope someone can help. I am using the TAdvString v8.5.10.0 grid component with Delphi 10.4.1 with a VCL application.
If you drop a TAdvStringgrid onto a form and keep ParentFont set to true then the grid font uses the same font as the form, but the Fixed font has to be set manually.
If you then set the fixed font to the same font and size as the form font (say 9 point) in the IDE, the grid still looks OK (same size fonts), but the Fixed font size reports in code as being 6 point.
If you then try to control font sizes in code such as like this
grid.Fixedfont.size := grid.font.size
the fixed font comes out looking larger than the standard font.
This situation seems to be true whether the form is displayed on a low or high DPI screen and whether or not the form "scaled" property is set to true or false. Have also replicated this in both 32- and 64-bit apps. My app manifest DPI awareness settings are set to "Per Monitor V2". If I set DPI awareness to "None" then the problem disappears.
I think this is a bug (presumably related to PPI settings) but perhaps I am missing something.
Thanks in advance for any assistance!
Charlie