Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Printing using RichEditWithToolBar and PrinterJob on the same sheep of paper?
Printing using RichEditWithToolBar and PrinterJob on the same sheep of paper? [message #14172] Sun, 17 February 2008 19:56 Go to next message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
Hi all,
I would like to print in a single sheet of paper information comming from a RichEditWithToolBar but also comming from DrawText (PrinterJob ) instructions, like this:
On the top of the page I would like to print a custom header using DrawText (PrinterJob ) and in the second half of the page print the contents (a short document) of a RichEditWithToolBar.
Is this possible? How do I mixe the two printing methods?
Thanks a lot,
Alex
Re: Printing using RichEditWithToolBar and PrinterJob on the same sheet of paper? [message #14182 is a reply to message #14172] Mon, 18 February 2008 13:01 Go to previous messageGo to next message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
Hi again…

As nobody till now contribute with a solution or a advice (I am a beginner…) I think (with my little knowledge) that Print method of the RichEdit must be virtual, what do all of you think? And it must receive the printer job handler, right? Thus, if if someone wants to print something external to the RichEdit control he or she could rewrite the print method and print what he wants in conjunction with the contents of the RichEditControl. I have tried this but code is very complex and confusing I think…

RichEditWithToolbar calls Print of RichEdit then it call print of no class in RichEditView… It is difficult for me to make this virtual and supply the printer context already initialized. Anyone with a better solution?

My test case is this: I have a dialog with some 2 sets of edit boxes and a RichEditWithToolbar. The user write a letter in the RichEditWithToolbar and the first set of edit boxes are the source address and the second set of edit box is used to fill the target address. Both addresses and letter must be printed in the same paper sheet at specific location in order to position the target address in a transparent plastic window of the envelop.

Any solutions or advices would be appreciated,

Alex

Re: Printing using RichEditWithToolBar and PrinterJob on the same sheep of paper? [message #14184 is a reply to message #14172] Mon, 18 February 2008 14:38 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
alex100 wrote on Sun, 17 February 2008 13:56

Hi all,
I would like to print in a single sheet of paper information comming from a RichEditWithToolBar but also comming from DrawText (PrinterJob ) instructions, like this:
On the top of the page I would like to print a custom header using DrawText (PrinterJob ) and in the second half of the page print the contents (a short document) of a RichEditWithToolBar.
Is this possible? How do I mixe the two printing methods?
Thanks a lot,
Alex


Not using RichEditWithToolBar. Just get your own toolbar and replace the print button (reusing all other buttons in the process).

It might sound complex, but is really simple. Look at RichEditWithToolBar implementation.

(RichEditWithToolBar is meant for "simple cases" only).

Mirek
Previous Topic: MinSize and ParentCtrl
Next Topic: Problem with DropList and FlatSpin
Goto Forum:
  


Current Time: Mon Apr 29 02:56:58 CEST 2024

Total time taken to generate the page: 0.03261 seconds