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

TCustomLabel.UpdateSize

Adjusts the size for the control based on settings in AutoSize and OptimalFill.

Declaration

Source position: stdctrls.pp line 1594

protected procedure TCustomLabel.UpdateSize;

Description

UpdateSize is a method used to adjust the size for the control based on settings in the AutoSize and OptimalFill properties. UpdateSize calls InvalidatePreferredSize.

When OptimalFill is True and AutoSize is False, the AdjustFontForOptimalFill method is called to adjust the font size used in the control. AdjustSize is called to resize the control (and any parent controls). When Alignment is set to taRightJustify, the value in Left may be changed to reflect the new Width for the control.

UpdateSize is called from the implementation of the FontChanged and TextChanged methods, and when setting a new value for the ShowAccelChar or WordWrap properties.


Version 3.2 Generated 2024-02-25 Home