<< Click to display table of contents >> TCustomRuler.Zoom |
This property must be equal to zooming in the editor that works with this ruler, percent.
type
TZoomRange = 1 .. 10000; // 1% - 10000%
property Zoom: TZoomRange;
By default, if you did not change any “pixels per inch” properties of TRichViewEdit and this ruler, then a document is not scaled, and Zoom = 100 (meaning 100%).
However, if you changed TRichViewEdit.DocumentPixelsPerInch, you must change Zoom accordingly:
RVRuler1.Zoom :=
Round(100*RichViewEdit1.GetRealDocumentPixelsPerInch /
RVRuler1.ScreenRes);
An alternative solution would be assigning RVRuler1.ScreenRes = RichViewEdit1.GetRealDocumentPixelsPerInch. However, it is not recommended, because:
•it scales all the ruler visual elements too;
•ScreenRes is reset when the ruler is loaded from DFM and when it is resized.
Default value
100