There is no such event. You can create a custom descendant of the dialog and then register it as a replacement to the built-in dialog. The PageSetupDialog is defined in ppPgSDlg.pas, the registration appears in the Initialization/Finalization at the bottom. The dialog is displayed by the TppDesignDialogController.ShowPageSetupDialog method, defined in ppDesignDialogController.pas
- Nard Moseley Digital Metaphors www.digital-metaphors.com
Best regards,
Nard Moseley Digital Metaphors www.digital-metaphors.com
Inbetween I've tried the Designer.Report.PrinterSetup.OnPageDefChange event. I.e. I'm assigning an event handler at runtime. It *seems* to work for my purpose (I need to react when page margins are being changed), but not completely. A kind of "refresh" is missing when I change the margins. Usually I see the designer space become bigger, if the margins become smaller, and the other way around - immediately that is.
Once I assign the Designer.Report.PrinterSetup.OnPageDefChange event, I see the changes only after I change the margins, switch to the preview and back. Calling "inherited" doesn't help.
Since it works in general, it can't be a completely wrong way, can it?
That approach could cause an issue. Internally the TppReport class uses the PrinterSetup.OnPageDefChange event. Or to be more precise, TppProducer, the ancestor to TppReport uses it. In ppProd.pas, check out the constructor, TppProducer.Create to see where this is assigned.
- Nard Moseley Digital Metaphors www.digital-metaphors.com
Best regards,
Nard Moseley Digital Metaphors www.digital-metaphors.com
Comments
then register it as a replacement to the built-in dialog. The
PageSetupDialog is defined in ppPgSDlg.pas, the registration appears in the
Initialization/Finalization at the bottom. The dialog is displayed by the
TppDesignDialogController.ShowPageSetupDialog method, defined in
ppDesignDialogController.pas
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Inbetween I've tried the Designer.Report.PrinterSetup.OnPageDefChange event.
I.e. I'm assigning an event handler at runtime. It *seems* to work for my
purpose (I need to react when page margins are being changed), but not
completely. A kind of "refresh" is missing when I change the margins.
Usually I see the designer space become bigger, if the margins become
smaller, and the other way around - immediately that is.
Once I assign the Designer.Report.PrinterSetup.OnPageDefChange event, I see
the changes only after I change the margins, switch to the preview and back.
Calling "inherited" doesn't help.
Since it works in general, it can't be a completely wrong way, can it?
PrinterSetup.OnPageDefChange event. Or to be more precise, TppProducer, the
ancestor to TppReport uses it. In ppProd.pas, check out the constructor,
TppProducer.Create to see where this is assigned.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com