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

# TControl.CanAutoSize

Determines if auto-sizing is possible, and if so, gets the new width and height when enabled.

## Declaration

Source position: controls.pp line 1390

`protected function TControl.CanAutoSize(`
`var NewWidth: Integer;`
`var NewHeight: Integer`
`):Boolean; virtual;`

## Arguments

`NewWidth` |  | Suggested width, can be adjusted in an overridden version.
`NewHeight` |  | Suggested height, can be adjusted in an overridden version.

## Function result

TControl returns True.

## Description

Always returns True in TControl. The values in NewWidth and NewHeight are not updated in TControl. Override the method in descendent classes to return values as needed for the class type.