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

# TCustomLabel.SetBounds

Sets the bounds (Top, Left, Width, Height) for the control.

## Declaration

Source position: stdctrls.pp line 1611

`public procedure TCustomLabel.SetBounds(`
`aLeft: Integer;`
`aTop: Integer;`
`aWidth: Integer;`
`aHeight: Integer`
`); override;`

## Arguments

`aLeft` |  | Horizontal coordinate for the left-hand edge of the control.
`aTop` |  | Vertical coordinate for the top edge of the control.
`aWidth` |  | New width for the control.
`aHeight` |  | New Height for the control.

## Description

Overridden to call InvalidatePreferredSize the first time the method is used and both AutoSize and WordWrap are enabled in the control. Calls the inherited method prior to exit.

## See also

TCustomLabel.AutoSize |  | Enables or disables auto-sizing the control to its content.
TCustomLabel.WordWrap |  | Allows the caption to wrap to multiple lines when it is longer than the available Width.
TControl.InvalidatePreferredSize |  | Marks the preferred size as invalid for this control and all parents (implies that we will look for another).
TControl.SetBounds |  | Sets the bounds (Left, Top, Width, Height) of the control.