Under GTK the PAPER tab of the Print Setup Dialog essentially duplicates
the Page Setup Dialog. The only difference I see is that on the Page
Setup Dialog, the user can change the margins, but they can't on the
Print Setup Dialog PAPER tab.
Here's my problem: Even though the user can't change the margins, they
can change the paper size using the PAPER tab of the Print Setup Dialog.
Changing the paper size could change the number of pages in the print
job, which should be displayed in the print range portion of the JOB
tab. Is there a way to intercept changes to the PAPER tab settings and
adjust the page count? Alternatively, is there a way to disable or
remove the PAPER tab, thus forcing the user to use the Page Setup Dialog
for those setttings?
Secondly, how does one go about populating the max page number in the
Print Setup Dialog where the number of pages can depend on the
calculations made by the wx.Printout object? In the code, I've looked
at the wx.Printout object isn't created until after the Print Setup
Dialog has been displayed. Do most people just leave the max pages set
at 9999? Or do they just disable the print range selection altogether?
My printing application will be printing tabular data from database
queries.
Under GTK the PAPER tab of the Print Setup Dialog essentially duplicates
the Page Setup Dialog. The only difference I see is that on the Page
Setup Dialog, the user can change the margins, but they can't on the
Print Setup Dialog PAPER tab.
Here's my problem: Even though the user can't change the margins, they
can change the paper size using the PAPER tab of the Print Setup Dialog.
Changing the paper size could change the number of pages in the print
job, which should be displayed in the print range portion of the JOB
tab. Is there a way to intercept changes to the PAPER tab settings and
adjust the page count?
No.
Alternatively, is there a way to disable or
remove the PAPER tab, thus forcing the user to use the Page Setup Dialog
for those setttings?
I don't think there is currently a way to do this, but it might be possible to add it. You can ask about it on wx-users and see if anybody has any ideas.
Secondly, how does one go about populating the max page number in the
Print Setup Dialog where the number of pages can depend on the
calculations made by the wx.Printout object? In the code, I've looked
at the wx.Printout object isn't created until after the Print Setup
Dialog has been displayed. Do most people just leave the max pages set
at 9999? Or do they just disable the print range selection altogether?
I know this has been discussed before, but I don't think there was ever a good answer. I think people either leave it at 9999 or make an estimate based on the content you are printing. Depending on what the content is you may not be able to get exact layout and positioning details without the printer DC but you can often make some assumptions that will get you at least the number of pages that will be needed.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!