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

TControl.ChangeBounds

Sets the bounds (left, top, height, width) and optionally the BaseBounds of the control.

Declaration

Source position: controls.pp line 1394

protected procedure TControl.ChangeBounds(

  ALeft: Integer;

  ATop: Integer;

  AWidth: Integer;

  AHeight: Integer;

  KeepBase: Boolean

); virtual;

Arguments

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.

KeepBase

  

True when the BaseBounds should not be modified.

Description

ChangeBounds is called whenever the position or size of the control is set, either via the properties or by the layout engine in the LCL.

SetBounds calls ChangeBounds internally with KeepBase set to False, while the LCL layout engine calls it with KeepBase set to True.

Override this for code that might change the preferred size or resizes other controls.

You can call this function in your custom controls. Keep in mind that the given aLeft, aTop, aWidth, aHeight might not be valid and will be changed by the LCL before applied.


Version 3.2 Generated 2024-02-25 Home