Unit 'ExtCtrls' Package
[Overview][Types][Classes][Procedures and functions][Index] [#lcl]

TCustomControlBar.CalcBandHeightSnapped

Calculates the vertical space needed for a band on the control bar when RowSnap is enabled.

Declaration

Source position: extctrls.pp line 1609

protected function TCustomControlBar.CalcBandHeightSnapped(

  AControl: TControl

):Integer;

Arguments

AControl

  

Control on the TCtrlBand instance with the total height used in the method.

Function result

Number of pixels needed for the specified band when RowSnap is enabled.

Description

CalcBandHeightSnapped is an Integer function used to calculate the height for the bands on the control bar when RowSnap is enabled.

The RowSize property contains the height for an individual band, and is used as a divisor to determine the number of visible bands given the overall height for the Control. Space is reserved for borders on each band using the cBandBorderV constant.

The return value contains the space required for the number of visible bands using the calculated row size.

CalcBandHeightSnapped is a called from the CalcBandHeight method when RowSnap is enabled for the control. It is also called from CheckBandsSizeAndVisibility for each of the visible bands on the control bar.

See also

TCustomControlBar.RowSize

  

Height used for a band or a row of bands displayed on the control bar.

TCustomControlBar.RowSnap

  

Indicates if a band or row of bands snaps to the height for the control bar.

TCustomControlBar.CalcBandHeight

  

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

TCustomControlBar.CheckBandsSizeAndVisibility

  

Updates the size and visibility for TCtrlBand instances defined in the control bar.

TControl.Height

  

The vertical size for the control.



CT Web help

CodeTyphon Studio