Scale Mode in Preview Control

Hi Alex,

we would like to set the scale mode property of the preview control programmatically.
For example to "fit to page" or "87%".
How to accomplish that? In the class reference we could not find a suitable property
or method.


Best Regards

Claus

Comments

  • edited 4:06PM
    Hello,

    It's a Zoom property, and ZoomIn, ZoomOut, ZoomPageWidth, ZoomWholePage methods of the PreviewControl.
  • edited 4:06PM
    OK, but how to apply? We used the code below, but preview windows didn't scale.

    frReport = new FastReport.Report();
    frReport.Load(sFilename);
    frReport.SetParameterValue(...);
    frReport.Preview = this.frPreview;
    frPreview.ZoomWholePage();
    frReport.Show();

    Used Version 1.0.56.0.

    Regards
  • edited 4:06PM
    Do it after preview:

    frReport.Show();
    frPreview.ZoomWholePage();
  • edited 4:06PM
    ... it didn't help!
  • edited 4:06PM
    I see; it is needed to do Application.DoEvents() before changing scale mode. I will fix it in the next build.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.