RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.AdjustSize Method

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

Pascal
procedure AdjustSize; dynamic;
C++
__fastcall AdjustSize();

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. 

Descendant 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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!