Question

How to change text size in stringgrid header?

Was it helpful?

Solution

You could write an OnApplyStyleLookup event handler similar to this:

procedure TForm1.StringGrid1ApplyStyleLookup(Sender: TObject);
var
  Header: THeader;
  I: Integer;
begin
  Header := THeader((Sender as TStringGrid).FindStyleResource('header'));
  if Assigned(Header) then
  begin
    for I := 0 to Header.Count - 1 do
      with Header.Items[I].Font do
      begin
        Size := 32;
        Style := [TFontStyle.fsBold];
      end;
    Header.Height := 48;
  end;
  TStringGrid(Sender).Realign;
end;

OTHER TIPS

How to change font size at StringGrid in rad studio XE3 - FM2 Firemonkey 2 not firemonkey 1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top