View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005241 | JEDI VCL | 00 JVCL Components | public | 2010-05-18 09:14 | 2010-06-07 09:42 |
Reporter | dzomlija | Assigned To | AHUser | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 3.39 | ||||
Target Version | Fixed in Version | ||||
Summary | 0005241: TJvPreviewControl - Printer Setup Dialog creates additional page | ||||
Description | The two previous issues I had with TJvPreviewControl have been correctly resolved, but now another has cropped up, hopefully for the last time. The demo application I have been using over the course of reporting these problems, is supposed to provide a 10-page document (unit_form_print_preview.pas lines 316-327). But when PrinterSetupDialog1 is executed (unit_form_print_preview.pas lines 346 - 347) and the metafile is "rebuilt", an extra page gets added. Regardless of whether the page size gets changed, the layout, or even if the dialog is executed and OK is clicked without making any changes, the result remains the same - an extra page gets added. 11. 12. 13 - even though the demo is supposed to only produce 10 pages. | ||||
Tags | No tags attached. | ||||
2010-05-18 09:14
|
TJvPreviewControl - Extra Page created on Printer Setup.zip (682,488 bytes) |
|
I see no way to solve this without introducing a new event "OnNeedMorePages" because the "NeedMorePages" flag is set _after_ the page was added. Your demo code calls CreatePreview(True) what means that it should append a new page. And this is where it goes wrong because the page is added and then it gets the information "NeedMorePage". |
|
Doh! Thank you, AHUser, for all the trouble. I went back into the code, and changed CreatePreview(True) to CreatePreview(False) at lines 302 and 310, and the problem went away in both the demo app i've been using here, and the "production version" in which I first noticed the problems. "TJvPreviewControl" is a uniquely productive component, and will most defintely be used more often now that the 2 major issues I've had have been resolved. Here's a suggestion, if I may? How about duplicating most of the TCanvas methods to use mm instead of pixels? For example, "MoveTo(X, Y: Integer)" and "LineTo(X, Y: Integer)" can be changed to type TCanvasUnits = (cuDefault, cuMillimeter, cuPoints, cuXXXX); MoveTo(X, Y: Integer; const Units:TCanvasUnits=cuDefault); LineTo(X, Y: Integer; const Units:TCanvasUnits=cuDefault); Similar changes can also be applied to setting page size, pen size and font sizes? I just find it's perhaps easier to use more logical units of measurement such as mm, don't you agree? |
|
Thanks for the confirmation. The rest of your answer should go in a separate feature request. What would be even better would be if you could try to create those changes yourself. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-05-18 09:14 | dzomlija | New Issue | |
2010-05-18 09:14 | dzomlija | File Added: TJvPreviewControl - Extra Page created on Printer Setup.zip | |
2010-05-18 18:53 | AHUser | Note Added: 0017402 | |
2010-05-18 18:53 | AHUser | Assigned To | => AHUser |
2010-05-18 18:53 | AHUser | Status | new => feedback |
2010-05-18 21:10 | dzomlija | Note Added: 0017404 | |
2010-06-07 09:42 | obones | Note Added: 0017431 | |
2010-06-07 09:42 | obones | Status | feedback => resolved |
2010-06-07 09:42 | obones | Resolution | open => no change required |