Newbie question: best way to print showing PrintDialog

  • Hello
    I'm currently using WPTools7 in my application, but a few customers are complaining about problems while printing (blank pages).
    I use a custom toolbar with a print button, which calls the following routine when clicked:

    "if PrintDialog1.Execute() then WPRichText1.Print;"

    Is this the correct way to do it? Or should I put some parameters like "WPRichText1.Print('@@DEFAULT@@')"? Or should I use "WPrichText1.Printdialog('')"?

    PS: I don't want to use the WPToolbar because the icons are too ugly.

    Thanks

    • Offizieller Beitrag

    Hi,

    Zitat

    I don't want to use the WPToolbar because the icons are too ugly.

    You can change the Icons - they are loaded from a large PNG Image which is provided by the comonent TWPImageList. The Manual describes how it is used. WPTools does not use the Standard ImageList since that does not handle PNG well enough - it supports transparency, but no Alpha mask. If you see "ugliness" - it can have to do with the Image list. Only the PNG Image provides good quality.


    According to printing your code is good. Better would be WPrichText1.Printdialog since that also handles page selection and other. (Check out its source in WPCtrRich.pas)

  • Ok, I'll switch to WPRichText1.PrinDialog then. Do I need to add the "('')" at the end, like in "WPRichText1.PrintDialog('')"?
    As to the WPToolbar icons, they are rendered correctly in my computer but I just don't like their design, I prefer something more "MSWord like". I'll see if I manage to change the PNG file as you suggested.
    Thank you for the help and tips!