[wxPython-users] Wizard and refreshing wx.StaticText

Christopher Barker Chris.Barker at noaa.gov
Wed Sep 19 10:10:12 PDT 2007


M. Adv wrote:
> self.sizer.Add(wx.StaticText(self, -1, 'You opened : %s'% 
> os.path.split(path)[1],(0,110)))

This looks like you are adding a new StaticText each time -- that's not 
what you want. Instead, create the StaticText, save a reference to it in 
your class, then what the file is opened, call:

wx.StaticText.SetLabel( YourText )


-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov




More information about the wxpython-users mailing list