RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.ChangeScale Method

Rescaling event dispatcher.

Pascal
procedure ChangeScale(M: Integer; D: Integer); dynamic;
C++
__fastcall ChangeScale(int M, int D);

ChangeScale is called automatically when some event requires that the control resize itself. Most often, this event is 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 shrink away or creep off the form. Consider destroying and reloading the form after several rescalings.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!