You are here

Rewrapping wx.StaticText

Per this thread (see the _Rewrap function in Robin's example code), you need to set the Label Text again in order for it to update properly:

def _Rewrap(self): 
    self.st.Freeze() 
    self.st.SetLabel(self._label) 
    self.st.Wrap(self.GetSize().width) 
    self.st.Thaw() 

You may also need to call self.Layout() (which is the parent of the StaticText element) in order to make sure everything is a-okay.