TColorButton.DoAutoAdjustLayout procedure
Applies auto-layout changes using the specified policy and scaling proportions to the control.
Declaration
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion: Double;
const AYProportion: Double); overrideArguments
AMode | Identifies the auto-layout policy applied in the method. |
AXProportion | Scaling factor for horizontal dimensions. |
AYProportion | Scaling factor for vertical dimensions. |
Description
DoAutoAdjustLayout is an overridden method in
TColorButton used to implement changes to control and border sizes
for the AutoAdjustLayout method. These methods are called when High-DPI and
scaling have been enabled in the project options for an application.
AMode indicates the automatic layout policy applied in the method.
It is a value from the TLayoutAdjustmentPolicy enumeration, and determines
whether horizontal / vertical / or both sizes are adjusted in the method. It
generally reflects the constraints for the device type where the application
is running.
AXProportion and
AYProportion contain the scaling
factors applied to the horizontal and/or vertical sizes.
DoAutoAdjustLayout calls the inherited method on entry. It extends the method to update the ButtonColorSize and BorderWidth properties when AMode indicates that either horizontal or high DPI scaling are used.
Added in LCL version 3.0.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
