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

TSizeConstraints.AutoAdjustLayout

Adjusts width and height values in the class using the specified scaling factors.

Declaration

Source position: controls.pp line 736

public procedure TSizeConstraints.AutoAdjustLayout(

  const AXProportion: Double;

  const AYProportion: Double

);

Arguments

AXProportion

  

Scaling factor applied to width values.

AYProportion

  

Scaling factor applied to height values.

Description

AutoAdjustLayout ensures that assigned (non-zero) values in MinHeight, MaxHeight, MinWidth, and MaxWidth are scaled by the corresponding scaling factor. If any of the property values are scaled, the Change method is called to notify the associated Control that it should adjust it size. The OnChange event is signalled (when assigned).

AutoAdjustLayout is called from the DoAutoAdjustLayout method in Control, and occurs after values in BorderSpacing have been scaled. It occurs before the new height and width for the Control are calculated and applied to its BaseBounds.

See also

TSizeConstraints.MaxHeight

  

The maximum height for the associated Control.

TSizeConstraints.MaxWidth

  

The maximum width for the associated Control.

TSizeConstraints.MinHeight

  

The minimum height for the associated Control.

TSizeConstraints.MinWidth

  

The minimum width for the associated Control.

TSizeConstraints.Control

  

The associated Control to which these constraints apply.

TSizeConstraints.Change

  

Adjusts the size for the associated Control, and signals the OnChange handler when assigned.

TControl.DoConstraintsChange

  

Performs actions needed when value(s) in Constraints have been changed.

TControl.DoAutoAdjustLayout

  

Applies layout changes using the specified policy and scaling proportions to the control.

TControl.BorderSpacing

  

Determines the inner and outer border spacing for this control.

TControl.AdjustSize

  

Smart way to DoAutoSize.

TControl.BaseBounds

  

The rectangle with the designed bounds for the control.


Version 4.0 Generated 2025-05-03 Home