[wxPython-users] wx.StaticText wrapping when it shouldn't

Robin Dunn robin at alldunn.com
Mon Apr 2 11:29:08 PDT 2007


Nathan Lundquist wrote:
> Hey everybody. I'm having a problem with wx.StaticText and wrapping. I
> did a search through my so far collected wxPython mailing list archive
> and came up with nothing.
> 
> My wx.StaticText widgets are wrapping text in cases where it makes no
> sense (at least to me). Some lines wrap that are shorter than lines that
> don't wrap.
> 
> Here's a small excerpt of the part of my app that generates the text
> widgets.

Platform and version?  There was a bug in wxGTK when it calculated the 
best size of the static text that it could sometimes end up being 1 
pixel too narrow.  So when the sizer sized it to that size the native 
widget thought that it needed to wrap.  I'm pretty sure that this has 
been fixed in the current release, (and maybe one or two before that too.)


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list