[Gambas-user] Interactive print designer anybody?

Doriano Blengino doriano.blengino at ...1909...
Sat Sep 20 14:06:42 CEST 2008


When time came for my accounting application to print an invoice-like 
document, I first made a print preview. Then I spent a lot of time on 
writing perhaps 100 lines of code full of draw.xxx(xxx,yyy,....) until, 
just after the document was almost ok, I decided I wanted an interactive 
editor for printing, and I did it. The 100 lines of code in the program 
became perhaps 15, and the preview form became 1700 lines long... but to 
rebuild the same document took me 1 hour instead of a couple days.

While waiting for interactive gb.report, maybe someone could benefit 
from this fmPrintPreview. It is not complete, but for printing a single 
page is enough. In the main program just put data paired with a tag, and 
then edit all the rest interactively. Properties edited visually are 
save in file. Printed page should be just the same as preview shows.

All the thing can be very unusual, from the base concept to the way 
geometry is managed, but simply try to drag items around and play with 
the properties and the "..." button. A Readme file inside the project, 
and many comments in the code, can explain concepts.

If sufficient feedback arrives, then I could write some documentation to 
help others use this facility.
If someone finds some bug (surely a lot), or has some enhancement, 
please let me know. I will not change idea about two fundamental 
concepts (program-driven and geometry manager), but everything else can 
be changed.

Happy coding to all,
Doriano Blengino

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PrintDesigner-0.0.17.tar.gz
Type: application/gzip
Size: 72889 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080920/ab345184/attachment.gz>


More information about the User mailing list