I have a panel with some static text on. I have an onClick event that changes the text on the panel but when I write to the to the panel the text are all on top of each other.
Is there a way to refresh the panel and its object?
Wesley
I have a panel with some static text on. I have an onClick event that changes the text on the panel but when I write to the to the panel the text are all on top of each other.
Is there a way to refresh the panel and its object?
Wesley
Wesley,
Wesley Nitsckie wrote:
I have a panel with some static text on. I have an onClick event that changes the text on the panel but when I write to the to the panel the text are all on top of each other.
Is there a way to refresh the panel and its object?
Are you using sizers? Then sizer.Layout() or panel.Layout() should do the trick, sometimes a panel.Refresh() is needed.
Werner
You may also have to create the static text with the wx.ST_NO_AUTORESIZE style.
--
Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com
Wesley Nitsckie wrote:
I have a panel with some static text on. I have an onClick event that changes the text on the panel but when I write to the to the panel the text are all on top of each other.
Are you changing the text in the existing static text widget, or creating a new widget? If the latter then the problem is that both widgets are now occupying the same space. If you want to have more than one widget then use a sizer to manage the layout and call Layout when changes are made. If you only want the one widget then don't make a new on.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!