delphifiremonkeytstringgriddelphi-12-athens

How to increase the column header font size in TStringGrid for Delphi FMX?


I have a simple TStringGrid on my form.

One would expect that you can simply change the Font Size in the object inspector for the header here:

Delphi Programming IDE Object Inspector

But that doesn't seem to work at all. No matter what size I make it, it appears the same.


What am I missing? What do I need to do to get the font size to change?

Here's my DFM for the string grid:

      object GridOperatingSystemImages: TStringGrid
        Align = Top
        CanFocus = True
        ClipChildren = True
        Margins.Left = 70.00000000000000000
        Margins.Top = 40.00000000000000000
        Margins.Right = 70.00000000000000000
        Position.X = 70.00000000000000000
        Position.Y = 215.71427917480470000
        Size.Width = 795.00000000000000000
        Size.Height = 209.00000000000000000
        Size.PlatformDefault = False
        TextSettings.Font.Size = 16.00000000000000000
        StyledSettings = [Family, Style, FontColor]
        TabOrder = 4
        OnSelectCell = GridOperatingSystemImagesSelectCell
        Viewport.Width = 775.00000000000000000
        Viewport.Height = 168.00000000000000000
        object StringColumn1: TStringColumn
          Header = 'Operating System:'
          HeaderSettings.TextSettings.Font.Size = 16.00000000000000000
          HeaderSettings.TextSettings.WordWrap = False
          ReadOnly = True
          Size.Width = 795.00000000000000000
        end
      end

Ideally I'd like to simply be able to change the font size during design-time and not run-time, but if needs be, a run-time solution is fine also.


Solution

  • Turns out I had to simply untick the Size option in the StyledSettings dropdown:

    Delphi Programming IDE Object Inspector

    And now my font size is working!