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

displaying hints over TppShape components

edited December 2003 in General
I have a question: how I can make hints (it's called hint in Delphi - a
yellow area with text over some control
when a mouse is over that control) show over particular controls? In my case
I am interested in displaying hints
n preview mode over TppShape component.

Thanks in advance.
Oleg

Comments

  • edited December 2003
    Hi Oleg,

    The ability to display hints when the mouse is over an object in the
    Previewer is not a built in feature in ReportBuilder, however, all dialogs
    in ReportBuilder (with the exception of the Designer) are replaceable so it
    would be possible for you to code your own preview plugin that enables this
    capability. There is an article in the Tech-Tips newsgroup on replacing
    dialogs in ReportBuilder that will give you an idea of what I'm talking
    about, but first you should read the article below on creating a Preview
    Plugin.

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

    Q: I've followed the tutorials and registered a Preview Form replacement but
    that did not affect the TppDesigner's Preview workspace.


    A: Do not use the form replacement, but rather, there is a different
    architecture built into the preview form that is registered by default.



    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.

    --
    Best Regards,

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