Vcl.ComCtrls.TCustomStatusBar.ChangeScale
Delphi
procedure ChangeScale(M, D: Integer; isDpiChange: Boolean); override;
C++
DYNAMIC void __fastcall ChangeScale(int M, int D, bool isDpiChange)/* overload */;
DYNAMIC inline void __fastcall ChangeScale(int M, int D){ Vcl::Controls::TControl::ChangeScale(M, D); }
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TCustomStatusBar |
Description
Repositions and resizes the status bar by a specified ratio.
ChangeScale is called automatically when the form that contains the status bar is rescaled. ChangeScale modifies the position as well as the size of a control. Thus, ChangeScale modifies the control's Top, Left, Width, and Height properties.
The M and D parameters define a fraction by which to scale the control. The M parameter is the multiplier and the D parameter is the divisor. For example, to make a control 75% of its original size, specify the value of M as 75, and the value of D as 100 (75/100). Alternately, the same results are achieved by specifying the value of M as 3, and the value of D as 4 (3/4). Both fractions are equal and result in the control being scaled by the same amount, 75%.
TCustomStatusBar overrides the inherited method to ensure that the new size of the status bar matches the system font if the UseSystemFont property is true.