Show: Delphi C++
Display Preferences

Vcl.Controls.TWinControl.AdjustSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AdjustSize; override;

C++

DYNAMIC void __fastcall AdjustSize();

Properties

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

Description

Adjusts the control's size according to its contents and constraints.

If the AutoSize property is true, AdjustSize is called automatically when the control needs to automatically resize itself to its contents. As implemented in TWinControl, 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.

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

Component writers may call AdjustSize when making changes to a control's contents.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance