[wxPython] Printing from wxTextCtrl

I incorporated your suggestions and I am able to print one page.

The following code causes the print dialog to be called twice. I have
not been able to find what is causing this.

demp_prntxtwx.py only calls the print dialog once.

···

__________

    def OnFilePrint(self, evt): # Print
        prntxtctrl = prntxtwx.PrintableTextControl(self, -1,
            self.control.GetValue(),
            style = wxTE_MULTILINE |
            wxHSCROLL)
# prntxtctrl.setPrintLinewrap(prntxtwx.PTC_LINEWRAP_ON)
        prntxtctrl.Show(false)
        prntxtctrl.OnDoPrint(self)
               
        self.Destroy()
        evt.Skip()

--- Finbarr O'Keeffe <fok@mcrane.co.uk> wrote:

Hello DJ Webre

The attached prntxtwx.py I downloaded from the internet and then use
the
"import prntxtwx" statement to call the module. The following lines
of code
are associated with a print button (developed using Boa RAD tool).
The only
problem I currently have is it does not seem to print more than one
page but
I have not spent much time investigating further. If you find a
solution let
me know

Good luck

Finbarr Okeeffe

    def OnButtonprintButton(self, event):
        prntxtctrl = prntxtwx.PrintableTextControl(self, -1,
                                             
self.textCtrl1.GetValue(),
                                              style=wxTE_MULTILINE |
wxHSCROLL)

        prntxtctrl.setPrintLinewrap(prntxtwx.PTC_LINEWRAP_ON)
        prntxtctrl.Show(false)
        prntxtctrl.OnDoPrint(self)
        self.save_data()
        self.Destroy()
        event.Skip()

-----Original Message-----
From: DJ Webre [mailto:d_webre@yahoo.com]
Sent: 22 April 2002 20:53
To: fok@mcl.mcrane.co.uk
Subject: printing from wxTextCtrl

In reviewing the mail listings (wxpython-users@lists.wxwindows.org),
I
noticed that you were trying to print from wxPython. Donnal Walter
on
Sep 14, 2001 offered some suggestions.

Were you able to print? If so would you send me your code.

Thanks in advance for any assistance.

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness