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

TControl.ChangeBounds

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

Declaration

Source position: controls.pp line 1258

protected procedure TControl.ChangeBounds(

  ALeft: Integer;

  ATop: Integer;

  AWidth: Integer;

  AHeight: Integer;

  KeepBase: Boolean

); virtual;

Arguments

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 layouter of the LCL.

SetBounds calls internally ChangeBounds with KeepBase=false, while the LCL layouter calls it with KeepBase=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.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.