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

# TCustomControlBar.CalcBandHeight

Calculates the vertical space needed for a band the control bar.

## Declaration

Source position: extctrls.pp line 1614

`protected function TCustomControlBar.CalcBandHeight(`
`AControl: TControl`
`):Integer;`

## Arguments

`AControl` |  | The band Control examined in the method.

## Function result

Number of pixels need for the height of the control bar.

## Description

CalcBandHeight is an Integer function used to calculate the vertical size for a TCtrlBand instance on the control bar.

The return value is normally assigned to the TCtrlBand.Height property when the band is created and aligned. When RowSnap is enabled for the control bar, the CalcBandHeightSnapped method is called to get the return value. Otherwise, the return value is calculated as the Height for the specified Control less the space needed for its vertical borders.

CalcBandHeight is called from the InitializeBand method and when the control is loaded using the LCL streaming mechanism.

## See also

TCustomControlBar.CalcBandHeightSnapped |  | Calculates the vertical space needed for a band on the control bar when RowSnap is enabled.
TCustomControlBar.InitializeBand |  | Configures a control bar band and calculates its row position, order, and geometry including client decorations.
TCustomControlBar.Loaded |  | Performs actions needed when component loading has been completed.
TCtrlBand.Height |  | Stored Height for the band used in comparisons during resizing.
TControl.Height |  | The vertical size for the control.