RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBoundLabel.AdjustBounds Method

Resizes the label when the text changes.

Pascal
procedure AdjustBounds; override;
C++
virtual __fastcall AdjustBounds();

When the text in the label or the font changes, AdjustBounds is implicitly called. It redraws the text in the client area, and then resizes the label if the AutoSize property is true. 

When WordWrap is true, the width of the label is fixed. If AutoSize is also true, changes to the text cause the label to change in height. When AutoSize is true and WordWrap is false, the height of the label is determined by the font, and changes to the text cause the label to change in width. 

Override AdjustBounds to make additional adjustments when the text changes. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!