AD
Administrator
Syncfusion Team
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.,
JF
Jeff Fansler
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.,