[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Grids' (#lcl)

# TCustomGrid.GetDefaultRowHeight

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

## Declaration

Source position: grids.pas line 1103

`protected function TCustomGrid.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.