[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Updates the size and extent of the control as well as its ClientRect.
Source position: controls.pp line 2188
protected procedure TWinControl.DoSetBounds( |
ALeft: Integer; |
ATop: Integer; |
AWidth: Integer; |
AHeight: Integer |
); override; |
ALeft |
|
New value for the Left property in the control. |
ATop |
|
New value for the Top property in the control. |
AWidth |
|
New value for the Width property in the control. |
AHeight |
|
New value for the Height property in the control. |
DoSetBounds is an overridden method in TWinControl. It keeps a copy of the current Width and Height prior to calling the inherited method to apply the argument values to the Left, Top, Width and Height properties.
It performs actions to adjust the CachedClientWidth and CachedClientHeight if the control flags do not indicate they are being loading or have already been loaded for the control. Changing the ClientRect here, to the most probable size, reduces unnecessary resize messages.
Normally, the ClientWidth / ClientHeight are adjusted automatically by the widget. But it is up to the widget when this will be done. GTK, for example, just puts resize requests in a queue. The LCL would resize the child components immediately after the GTK procedure to adjust the ClientRect. On complex forms with lots of nested controls, this would result in thousands of resize messages.
|
Internal function used to set the bounds for the control (Left, Top, Height, Width). |
|
|
The client coordinate with the left edge for the control. |
|
|
The client coordinate for the top edge of the control. |
|
|
The horizontal size for the control. |
|
|
The vertical size for the control. |
Version 3.2 | Generated 2024-02-25 | Home |