It helps if you create the control before trying to call SetValue(). Oops. (Time for a break.)
sorry - that code should have been as follows:
nb = wxNotebook(self, -1, wxDefaultPosition, self.GetClientSize())
win1 = wxPanel(self.nb, -1)
nb.AddPage(win1, "File Info")
self.code = wxTextCtrl(win1, 10, "", wxPoint(125, 25), wxSize(150, 20))
# the following line gives me: AttributeError: code
self.code.SetValue("")
路路路
------Original Message------
From: Gene Chiaramonte <gchiaramonte@mail.com>
To: wxpython-users@wxwindows.org
Sent: May 25, 2000 4:43:16 PM GMT
Subject: [wxPython] wxNotebook/wxText Question
I have a dialog window (self) and place a notebook on it. Then I create a page and put a static text and textctrl on the notebook.
self.nb = wxNotebook(self, -1, wxDefaultPosition, self.GetClientSize())
self.win1 = wxPanel(self.nb, -1)
self.nb.AddPage(self.win1, "File Info")
wxStaticText(win1, -1, "Code:", wxPoint(20, 25))
self.code = wxTextCtrl(win1, 10, "", wxPoint(125, 25), wxSize(150, 20))
Now I want to Get/Set the value of the textctrl as follows:
self.code.SetValue("")
But this gives me:
self.code.SetValue("")
AttributeError: code
Please tell me where I have strayed so I can correct my errant ways.
Thanks
Gene
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
_______________________________________________
wxPython-users mailing list wxPython-users@wxwindows.org
http://wxwindows.org/mailman/listinfo/wxpython-users
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup