How to set the Font of a Fixed Column in StringGrid lazarus / 13-General ---------------------------------------------------------------------- simonlazarus · 2009-12-13 10:43 TitleFont is not valid for Fixed Columns, in grids.pas TCustomGrid.PrepareCanvas function, check call to GetColumnFont, which limits it to be valid ONLY for rows. And Columns property is not valid for fixed column, index of which should be larger than FirstGridColumn. ---------------------------------------------------------------------- simonlazarus · 2009-12-13 10:46 My Lazarus version is 0.9.28.2, situation is same in both WindowsXP and Ubuntu9.10. ---------------------------------------------------------------------- simonlazarus · 2009-12-14 09:49 I tried to use OnPrepareCanvas, but SetCanvasFont is protected property. ---------------------------------------------------------------------- jesusr · 2009-12-15 20:47 Try grid.TitleFont To modify the font only on specific cells try OnPrepareCanvas grid event, there you can do something like: Code: [Select]procedure TForm1.StringGrid1PrepareCanvas(sender: TObject; aCol, aRow: Integer;   aState: TGridDrawState); begin   // set the font color on first row (fixed or not) to blue   // but only for cells not in fixed-col area.   If ((aRow = 0) and (aCol>=StringGrid1.FixedCols) then     StringGrid1.Canvas.Font.Color := clNavy; end;