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

Example off how to replace the TppTextSearchPreview with our own GUI?

edited January 2009 in General
Hi,

I integrated all controls below in our own custom viewer, how do I prevent
the TextSearchEngine to get the TextSearchSettings from
TppTextSearchPreview but from our own custom GUI?

Greetings,
Filip Moons


TppTextSearchPreview = class(TppCustomSearchPreview)
private
{visual controls}
FCaseSensitiveMenuItem: TppTBCustomItem;
FCurrentPageMenuItem: TppTBCustomItem;
FFirstButton: TppTBXButton;
FFirstPageMenuItem: TppTBCustomItem;
FLastButton: TppTBXButton;
FNextButton: TppTBXButton;
FPopupMenu: TppPopupMenuBase;
FPriorButton: TppTBXButton;
FSearchButton: TButton;
FSearchDoneButton: TButton;
FSearchEdit: TEdit;
FShowAllMenuItem: TppTBCustomItem;
FWholeWordMenuItem: TppTBCustomItem;

Comments

  • edited January 2009

    I do not understand the question or what you are trying to accomplish.

    The design is that the TextSearchSettings represents the 'model' the UI
    controls should update.

    UI <--> TextSearchSettings <--> SearchEngine

    See TppPreview.pas for the definition of the preview plug-in. This is a
    non-visual class that creates and manages the UI elements including the
    viewer/toolbar/statusbar/outline/text search. The TextSearchPreview is
    created and initialized by the TppCustomPreview.BeforePreview method. You
    can search that class for occurences of 'FSearchPreview' to see how it is
    managed.

    See TppTextSearchPreview.pas for an example of a text search plug-in. In
    that class see methods such as ControlsToSettings.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2009
    Sure, TextSearchPreview.UI <--> TextSearchSettings <--> SearchEngine not My
    UI, thats just my point
    and ControlsToSettings TextSearchPreview.UI -> SearchEngine again not My UI

    I want my UI <--> TextSearchSettings <--> SearchEngine
    and ControlsToSettings my UI -> SearchEngine

    Now i have my UI which isn't used by the SearchEngine

    ppTextSearchPreview: Creates the controls neccessary to provide an interface
    to the search engine. This class creates search controls in the Accessory
    Toolbar of the standard TppPreview form above the report outline on the left
    side of the viewer. I want my own controls so i need to replace somehow
    ppTextSearchPreview by my own class.




  • edited January 2009


    TppCustomSearchPreview defines an abstract ancestor (see
    ppTextSearchCustomPreview.pas)

    TppTextSearchPreview defines the default UI. (see in
    ppTextSearchPreview.pas)

    To define a custom UI, descend from TppCustomSearchPreview and create
    TmySearchPreview

    To register your custom UI, call
    TppPreviewPlugIn.RegisterSearchClass(TmySearchPreview) (see ppPreview.pas)



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.