Sign in Join
FPDoc Onlineexperiment

TCustomGrid.GetDefaultRowHeight function

Member of TCustomGridprotectedIn unit Grids

Gets the default height for a row in the grid control.

Declaration

pascal
function GetDefaultRowHeight: Integer; virtual

Function result

Default value used as the height for rows in the grid.

Description

GetDefaultRowHeight is an Integer function used to get the default height for a row in the grid control.

GetDefaultRowHeight uses a TCanvas instance to get the height for the text displayed in a row. If the control Canvas is unassigned, or does not have an allocated handle, a temporary TCanvas instance is created using the Font for the control. The TextHeight method in Canvas is called to get the return value for the method.

GetDefaultRowHeight is called from the GetDefRowHeight method used to get the value for the DefaultRowHeight property.

What are the 7 additional pixels added to the text height?

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.