[wxPython-users] text wrapping in wx.StaticText
justin mcguire
jherrico at gmail.com
Tue Aug 1 10:16:32 PDT 2006
i had thought of the same, but the issue of measuring the text is that the
text is picked up dynamically from a database and there would be no way to
make sure that the text would fit before picking it up, i have multiple
users entering things and it would be nearly impossible to regulate what
they are entering.
On 7/31/06, Robin Dunn <robin at alldunn.com> wrote:
>
> justin mcguire wrote:
> > ok heres another problem im having, i have a sizer (wx.FlexGridSizer)
> > that has one column and two rows the row on top has a picture and the
> > row on bottom has the wx.StaticText and everything looks great untill
> > the length of the text is longer than the width of the picture which
> > makes the sizer grow to fit the length of the text, if i change the
> > FlexibleDirection then it stops growing but cuts off the text. is there
> > a way to make the StaticText wrap or is there another alternative
> > besides keeping the text short?
>
> The static text control will wrap on some of the platforms if the size
> it's given is smaller than what it needs, but it's not consistent. What
> is consistent is that the best size is calculated without taking any
> wrapping into account. You can however measure the text and insert
> newlines into the string yourself.
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org Java give you jitters? Relax with wxPython!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200608=
01/db07cc39/attachment.htm
More information about the wxpython-users
mailing list