We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Printing of control nodes

Thread ID:

Created:

Updated:

Platform:

Replies:

30671 Jun 21,2005 08:30 PM UTC Jun 23,2005 12:55 PM UTC WinForms 2
loading
Tags: Diagram
Jeff Fansler
Asked On June 21, 2005 08:30 PM UTC

I''m using a control node and when I try to print, the node does not show up. I know it''s tricky to print controls and that''s probably why this happens. Do you have any elegant ways around this issue? Thanks, -Jeff Fansler

Administrator [Syncfusion]
Replied On June 22, 2005 07:41 PM UTC

Jeff, The current implementation of the ControlNode class does not provide any special handling for printing the contained control. When the node''s child control is inactive, the ControlNode will merely draw itself and the window contents of its child control onto the printer graphics context. However, if the control happens to be active during the printing process, the node itself will make no attempt to render the control onto the printer''s DC. We realize that this is a problem, and have logged a QA report on the issue. For the time being, please just make sure that all ControlNodes in your diagram are deactivated when invoking the Diagram Print method. If your control requires special rendering while printing, the easy way to go about this is to subclass the ControlNode, and override the ControlNode.Draw(Graphics) virtual. The ControlNode.Draw(Graphics) method is used for both drawing the node onto the screen DC, and also for printing. All you have to do is provide a flag in your application that specifies whether the node is being printed, and if so, handle the control drawing differently. In the future, we will also provide an option to render to the printer graphics context those controls that require special processing without having to resort to such workarounds. Regards, Prakash Surendra Syncfusion Inc.,

Jeff Fansler
Replied On June 23, 2005 12:55 PM UTC

Thanks Prakash, I implemented it exactly the way you said by subclassing the ControlNode. Thanks for your help. -Jeff >Jeff, > >The current implementation of the ControlNode class does not provide any special handling for printing the contained control. When the node''s child control is inactive, the ControlNode will merely draw itself and the window contents of its child control onto the printer graphics context. However, if the control happens to be active during the printing process, the node itself will make no attempt to render the control onto the printer''s DC. We realize that this is a problem, and have logged a QA report on the issue. For the time being, please just make sure that all ControlNodes in your diagram are deactivated when invoking the Diagram Print method. > >If your control requires special rendering while printing, the easy way to go about this is to subclass the ControlNode, and override the ControlNode.Draw(Graphics) virtual. The ControlNode.Draw(Graphics) method is used for both drawing the node onto the screen DC, and also for printing. All you have to do is provide a flag in your application that specifies whether the node is being printed, and if so, handle the control drawing differently. In the future, we will also provide an option to render to the printer graphics context those controls that require special processing without having to resort to such workarounds. > >Regards, >Prakash Surendra >Syncfusion Inc.,

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;