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

Vertical Scroll Bar

edited December 2004 in End User
Hi,
In the preview windows is it possible to activate a vertical scoll bar
to allow navigation between pages ?

If so will it work with the mouse wheel button.

brgds
Alex

Comments

  • edited December 2004
    Hi Alex,

    This is not a built in feature of the preview window, however it is possible
    to completely take control of the preview form by creating a custom preview
    plugin for this class. See the article below for more information on
    creating a custom preview form.

    -----------------------------------------
    Article: Creating a Preview Plugin
    -----------------------------------------

    You will need to register a TppPreview descendent. The class you register
    is used to create the preview controls inside the standard print preview
    form and the designer preview workspace.


    Here is an example of creating a simple custom preview that access the
    viewer its been assigned in order to change the page color. You can also do
    more advanced operations such as adding and removing buttons and change the
    behavior of the preview form. Access the inherited controls via. protected
    properties and override the virtual methods in order to customize behavior.

    Open ppPreview.pas and view the TppPreview class as a guide to create a
    custom preview descendent.


    unit MyPreviewPlugin;

    interface

    uses
    ppPreview;

    type
    TMyPreviewPlugin = class(TppPreview)
    public
    procedure BeforePreview; override;

    end;


    implementation

    uses
    Graphics;


    procedure TMyPreviewPlugin.BeforePreview;
    begin
    inherited BeforePreview;

    Viewer.PageColor := clRed;

    end;

    initialization
    TppPreviewPlugIn.Register(TMyPreviewPlugin);

    finalization
    TppPreviewPlugIn.UnRegister(TMyPreviewPlugin);

    end.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.