I am trying to print from wxTextCtrl using PrintFramework as suggested
by Robin Dunn on Jul 3, 2001 (Question about the PrintFramework).
The following code gives me an error
AttributeError: MainWindow instance has no attribute 'canvas'.
Any assistance is appreciated.
···
____________________________
from wxScrolledWindow import MyCanvas
import PrintFramework
...
...
def OnFilePrint(self, evt): # Print
prntxtctrl = PrintFramework.MyPrintout(self,
self.control.GetValue())
self.printData = wxPrintData()
self.printData.SetPaperId(wxPAPER_LETTER)
pdd = wxPrintDialogData()
pdd.SetPrintData(self.printData)
printer = wxPrinter(pdd)
==> printout = PrintFramework.MyPrintout(self.canvas, self.log)
if not printer.Print(self, printout):
wxMessageBox("Printer Problem")
else:
self.printData =
printer.GetPrintDialogData().GetPrintData()
printout.Destory()
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/