GridLineWidth

Class: TEgDBGridEx

property GridLineWidth: Integer write SetGridLineWidthEx;

Republished from TCustomGrid, where it was already published (read, default 1 and storage all still come from the ancestor declaration) but whose native setter has no idea AutoRowHeight, AutoTitleHeight, or AutoColumnWidth exist: it only invalidates the grid and updates the native scroll range. Since AdjustRowHeight, AdjustTitleHeight, and AdjustColumnWidth all read ActualGridLineWidth (native pixel scaling of this property) as part of their own layout math, changing GridLineWidth while any of those Auto* properties were active left their results stale until something unrelated happened to trigger a layout pass again.

The new write specifier, SetGridLineWidthEx, forwards the value to the ancestor property and then calls LayoutChanged, so the affected Auto* adjustments are recalculated immediately. There is no new stored field: the value itself still lives in and is read from TCustomGrid.

Line thickness at DPIs other than 96 is handled the same way as everywhere else in this unit - through ActualGridLineWidth, not through this unit’s own Zoom() - so GridLineWidth itself is still a design-time, unscaled pixel count, exactly like on plain TDBGrid.

See Also

(C) 2026 Easygate, Lda