[Tutor] How to save and later open text from a wxTextCtrl widget to a text file?

John Fouhy john at fouhy.net
Tue Oct 17 06:15:41 CEST 2006

On 17/10/06, Pine Marten <pine508 at hotmail.com> wrote:
> Thank you John for the code but I still can't get it to work and to simply
> save the contents of the text box to a file.  Here is the code I have which
> just makes a panel with a text control and two buttons, "Save" and "Save
> As..."  My hope is this can easily incorporate the changes you suggest, but
> I can't figure out how to do it:
> #Boa:Frame:Frame1
> import wx

Did you create this code, or did someone give it to you?  It looks
like it's been made with BoaConstructor.  If you're using Boa for
development, you'd probably be better off using it to add your save
functionality, rather than writing the code by hand.

Unfortunately, I can't help you with that, but maybe someone else can.

In fact, I see you've already got Save and SaveAs buttons, so maybe
you just need to edit OnSaveButton() and OnSaveAsButton().


More information about the Tutor mailing list