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

# TCustomControlBar.CMBorderChanged

Handles the CM_BORDERCHANGED message.

## Declaration

Source position: extctrls.pp line 1623

`protected procedure TCustomControlBar.CMBorderChanged(`
`var Message: TLMessage`
`); message;`

## Arguments

`Message` |  | Control message handled in the method.

## Description

CMBorderChanged calls the inherited method on entry to adjust the client rectangle and control size when a border is added to or removed from the control.

CalcInnerBevelWidth is called to get the space reserved for the settings in BevelInner and BevelOuter. If the calculated value differs from the previous value, the Top coordinate for each of the TCtrlBand instances on the control are shifted to their new positions. AlignControlsToBands is called to align the controls for the bands to their new positions. If IsRightToLeft returns True, the Left coordinate in each of the bands is also shifted.

## See also

TCustomControlBar.CalcInnerBevelWidth |  | Calculates the cumulative width for all borders and bevels used on the control bar.
TCtrlBands |  | Container used to store TCtrlBand instances.
TCtrlBand.Top |  | Contains the Top position for the band.
TCtrlBand.Left |  | Contains the Left position for the band.
TWinControl.CMBorderChanged |  | Handles a CM_BORDERCHANGED message received for the control.
TControl.IsRightToLeft |  | True when BiDiMode is not bdLeftToRight.