Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

PreviewForm, ZoomSetting and ButtonDown

edited December 2001 in General
In my report's MyReportPreviewFormCreate(..) event handler I set
TppViewer(Viewer) := zs100Percent;
When the report shows on screen the [WholePage] button is down and the zoom
edit control shows 100%.

Can I insert code to make the [100%] button down not the [WholePage] ?
Just to keep the display consistent.

Thanks

Russell

Comments

  • edited December 2001
    Using the "Controlling The Built-In Preview" Tech-Tip code, it appears to be
    working correctly in my test project.


    uses
    ppTypes, ppViewr;

    procedure TForm1.ppReport1BeforePrint(Sender: TObject);
    begin
    ppReport1.PreviewForm.WindowState := wsMaximized;
    TppViewer(ppReport1.PreviewForm.Viewer).ZoomSetting := zs100Percent;
    end;


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    What version of RB are you using? I am running with the 6.03 source.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    Thanks for your reply Jim

    I am using 6.02 and my code is the same as yours (I have other thing
    stoo...) except I do not maximize the form. Even adding maximization the
    wrong button is down (in 6.02)

    I have not yet downloaded 6.03. I will do that and if there is still a
    problem I'll get back to you.

    Thank you,

    Russell

  • edited December 2001
    The behavior is correct in ver 6.03.
    Thanks Tom.

    Russell

This discussion has been closed.