[wxPython] Question about the PrintFramework.

Hi,

I read the PrintFramework in the demos and there are something I don't understand.

Questions:
1. *** form wxScrolledWindow import MyCanvas ***
I tried to search MyCanvas from wxWindows Reference, there is no this topic. Is MyCanvas from one of your sample codes?

2. If I want to print text from a wxTextCtrl to a printer, what I need to do is:
a. Change canvas in the MyPrintout and TestPrintPanel class to textctrl?
b. Do I have to rewrite self.canvas.DoDrawing(dc) to self.textctrl.BLAH(dc)?

Thank you for your help.

Jenny

···

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Questions:
1. *** form wxScrolledWindow import MyCanvas ***
I tried to search MyCanvas from wxWindows Reference, there is no this

topic.

  Is MyCanvas from one of your sample codes?

It's in the demo in wxScrolledWindow.py, just like it says in the import
statement.

2. If I want to print text from a wxTextCtrl to a printer, what I need to

do

is:
a. Change canvas in the MyPrintout and TestPrintPanel class to textctrl?
b. Do I have to rewrite self.canvas.DoDrawing(dc) to

self.textctrl.BLAH(dc)?

If you were drawing the text in the textctrl yourself then you could do it
that way, but since you're not it won't help much. To print something you
just need to get a printer DC and draw on it. The Print Framework helps you
out by doing a lot of the gruntwork behind the scenes for you.

One of the easiest ways to print simple text is to transform it into simple
html and use wxHtmlEasyPrinting. For another alternaive, look at the
PrintableTextControl at http://starship.python.net/crew/jjkunce/wxpython/

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!