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

TWinControl.DoSetBounds

DoSetBounds - anticipate the new clientwidth/height and call inherited method

Declaration

Source position: controls.pp line 1669

protected procedure TWinControl.DoSetBounds(

  ALeft: Integer;

  ATop: Integer;

  AWidth: Integer;

  AHeight: Integer

); override;

Description

TWinControl DoSetBounds

Params: ALeft, ATop, AWidth, AHeight : integer

Anticipate the new clientwidth/height and call inherited method

Normally the clientwidth/clientheight is adjusted automatically by the interface. But it is up to interface when this will be done. The gtk for example just puts resize requests into a queue. The LCL would resize the child components just after this procedure due to the clientrect. On complex forms with lots of nested controls, this would result in thousands of resizes.

Changing the clientrect in the LCL to the most probable size reduces unneccessary resizes.

See also

Control.DoSetBounds

  

Perform the actual setting of the boundary rectangle