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

# TCustomControlBar.RemoveControl

Removes the band with the specified control.

## Declaration

Source position: extctrls.pp line 1661

`public procedure TCustomControlBar.RemoveControl(`
`AControl: TControl`
`); override;`

## Arguments

`AControl` |  | Control removed from the control bar.

## Description

RemoveControl is an overridden method in TCustomControlBar. It performs additional actions when the Parent for the control in AControl has been set to Nil.

RemoveControl ensures that the TCtrlBand instance for the control is removed from the internal TCtrlBands container. When found, the Delete method in the list is called to remove the band.

RemoveControl calls the inherited method to remove the control specified in AControl.

If the control bar is not being freed, the Invalidate method is called to force the control to be redrawn.

## See also

TCtrlBand |  | Represents a band and control displayed by TControlBar.
TCtrlBands |  | Container used to store TCtrlBand instances.
TWinControl.RemoveControl |  | Removes the specified control from the Controls property.
TWinControl.Invalidate |  | Schedules a repaint request.