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

TWinControl.DoSetBounds

Updates the size and extent of the control as well as its ClientRect.

Declaration

Source position: controls.pp line 2113

protected procedure TWinControl.DoSetBounds(

  ALeft: Integer;

  ATop: Integer;

  AWidth: Integer;

  AHeight: Integer

); override;

Description

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.

See also

TControl.DoSetBounds

  

Internal function used to set the bounds for the control (Left, Top, Height, Width).



CT Web help

CodeTyphon Studio