Vcl.Controls.TControl.AdjustSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AdjustSize; dynamic;

C++

DYNAMIC void __fastcall AdjustSize();

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

Sets the size of the control as determined by the AutoSize property.

If the AutoSize property is true, AdjustSize is called automatically when the control needs to automatically resize itself to its contents. As implemented in TControl, AdjustSize calls SetBounds with the values of its Left, Top, Width, and Height properties. This call can result in a change of size if these values are altered in the control's OnCanResize or OnConstrainedResize event handlers, or if the control's OnResize event handler makes any final adjustments.

Descendent classes override AdjustSize to change the size of the control to adjust to its contents.

Other controls can call AdjustSize after changing the control's contents. Do not call AdjustSize in application code.

See Also