Unit 'Controls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]


Enables automatic sizing for the control.


Source position: controls.pp line 1611

public procedure TControl.EnableAutoSizing;


EnableAutoSizing is used along with DisableAutoSizing to suspend and restore auto-sizing when the Parent, alignment, layout, visibility, or state for the control is updated. An exception is raised if EnableAutoSizing is called when DisableAutoSizing has not been called.

EnableAutoSizing decrements the internal counter used to track auto-sizing locks. When the counter reaches 0 (zero), the EnableAutoSizing method in the Parent control is called (when assigned). Otherwise, the DoAllAutoSize method is called to trigger the OnResize event handlers for the control.

It is not generally used in application code, but is needed by component developers.

See also



Disables automatic sizing; implies that the default size is accepted, or sizing is done manually.



The control within which the control is shown.



Resizes and aligns the control and all of it children.

CT Web help

CodeTyphon Studio