[wxPython-users] Re: How prevent StaticText from wrapping?
Robin Dunn
robin at alldunn.com
Wed Nov 14 21:10:25 PST 2007
Grant Edwards wrote:
> On 2007-11-12, Robin Dunn <robin at alldunn.com> wrote:
>> Grant Edwards wrote:
>>> I can't figure out how to tell a StaticText not to wrap.
>>> According to the docs, calling Wrap(-1) should disable
>>> wrapping, but it doesn't seem to work.
>
>> platform?
>
> Gento Linux (IA32)
>
> Python 2.4.4
> wxPython 2.6.4.0
> wxGTK 2.6.4.0
> gtk+ 2.10.14
>
The GTK static text has automatic wrapping built in so I think the only
way to prevent it is to make sure that the widget has enough width so it
doesn't need to wrap. At one point in time (might have been 2.6.4, but
I don't remember) there was an off-by-one bug where it would default to
one pixel too small, and so it would often wrap when you didn't expect
it. If that's what is happening in your case then it then it's pretty
easy to work around.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list