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

Custom Print Dialog

edited December 2001 in General
Is there an easy way to drop in a custom ppPDialog? The problem I'm
having with the existing one is all of the run-time resizing that is
happening. I'm creating a japanese version of my app, and after
translating the resources, it resizes and moves controls at runtime,
resulting in cut-off strings, etc. I tried to edit the .dfm resources,
but there is code in the dialog that overrides anything that is done
there.

I'm looking for an easy way to create my own, while still being able to
have the standard RB installation. There are multiple users that are
working on the project. I wouldn't want to have to have everyone
rebuild their RB libaries with custom changes. I would like to just
have the new source for the dialog in my project's workspace only.

Comments

  • edited December 2001
    You can create and register your own dialog, just like we do in the ppPDlg
    form unit.

    {***************************************************************************
    ***
    *
    ** I N I T I A L I Z A T I O N / F I N A L I Z A T I O N
    *
    {***************************************************************************
    ***}

    initialization

    ppRegisterForm(TppCustomPrintDialog, TmyPrintDialog);

    finalization

    ppUnRegisterForm(TppCustomPrintDialog);



    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    Will this make it NOT use the old print dialog when calling
    TppReport.Print? Do I have to do anything special to disable the old
    print dialog?
  • edited December 2001
    I seem to get an access violation when I add the initialization and
    finalization code, then call TppReport.Print.
  • edited December 2001
    This was my fault. I didn't override the abstract methods. Everything
    is working now. Thanks for your help.
This discussion has been closed.