Vcl.Controls.TControl.ChangeScale
Delphi
procedure ChangeScale(M, D: Integer); overload; dynamic;
procedure ChangeScale(M, D: Integer; isDpiChange: Boolean); overload; dynamic;
C++
DYNAMIC void __fastcall ChangeScale(int M, int D)/* overload */;
DYNAMIC void __fastcall ChangeScale(int M, int D, bool isDpiChange)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TControl |
Description
Rescaling event dispatcher.
ChangeScale is called automatically when an event requires that the control resize itself. Most often, this event is a call to the ScaleBy method of the control itself or the control's parent. This allows the control to adjust its own special properties, such as font sizes and display regions.
ChangeScale parameters have the same meaning as for ScaleBy.
Note: Because control sizes and coordinates are integers, scaling can result in round-off error. Repeated calls to ChangeScale can make the control gradually get smaller or slowly disappear from the form. Consider destroying and reloading the form after several rescalings.