SubTitle

Class: TEgColumn

property SubTitle: string;

An optional second line rendered below Title.Caption, using this column’s own SubTitleFont and the same horizontal alignment as Title.Alignment. Empty (the default): draws exactly as before, with no layout change at all - the row height is only taller than usual for a column that actually has a non-empty SubTitle.

Supports the same <var>VarID</var> and <br> markers as Title.Caption itself (see OnGetVariableValue), including the title-specific rule that <var> never resolves as a live dataset field. Word-wrap and shrink-to-fit behave the same way they do for the title line.

Row height: whenever any column in the grid has a non-empty SubTitle, the title row grows to a fixed proportion of its usual height to fit both lines, packed together (title line at the bottom of its own half, SubTitle at the top of its half). This only happens automatically when TitleRowHeightPx is not forcing a value and AutoTitleHeight is off - see that property for the combinations that are not supported.

SubTitle and its resolved text can be overridden per paint via OnBeforeDrawTitle’s SubTitleText parameter - but only to change or blank out an existing SubTitle, not to grow the row height for a column whose SubTitle was empty to begin with.

See Also

(C) 2026 Easygate, Lda