Thanks Niki, that's exactly what I was looking for!
Brent
···
-----Original Message-----
From: Niki Spahiev [mailto:spahievi@vega.bg]
Sent: Wednesday, October 04, 2000 4:05 PM
To: Brent Matzelle
Subject: Re: [wxPython] Saving info from multiple wxTextCtrls
Hello Brent,
Wednesday, October 04, 2000, 4:32:10 PM, you wrote:
Hello,
I have created a small GUI that is supposed to save information to a
particular text file when a wxButton event is triggered. However,
I'm
not sure how to pass the information over to the event function, or
even
if I should try to do it this way. Here is the code for the
program:
------------------------------------------------------------------------
--
from wxPython.wx import *
from bakvssconf import *
class MyFrame(wxFrame):
def __init__(self, parent, ID, title):
wxFrame.__init__(self, parent, ID, title, wxDefaultPosition,
wxSize(500, 280))
panel = wxPanel(self, -1)
wxStaticText(panel, -1, "VSS File name", wxPoint(10, 12))
file = wxTextCtrl(panel, 10, ssarcfile, wxPoint(150, 10),
wxSize(150, 20))
file.SetInsertionPoint(0)
a = file.GetValue()
[...]
def OnSave(self, event):
conf =
conf.append('# VSS Backup Configuration File\n\n')
conf.append('# VSS config\n')
conf.append('ssarcfile = "%s"\n' % a)
conf.append('ssarcpassword = "%"\n\n' % b)
[...]
Thanks very much for you help!
Brent
All GetValue() calls must be made in OnSave method. In order to do
this you must save control references in frame e.g.:
self.file = wxTextCtrl(panel, 10, ssarcfile, ... )
--
Best regards,
Niki mailto:spahievi@vega.bg
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users