So how do you know how many characters of a proportional font
correspond to the width (in pixels) of your window? Noting that
both the font and the window width may be under the control of
the user. And why do you have to bother at all, when you get it
for free with the MSW StaticText?
So how do you know how many characters of a proportional font
correspond to the width (in pixels) of your window? Noting that
both the font and the window width may be under the control of
the user.
You can use the average character width for the font. Or you can measure the actual text to be displayed and get a more exact wrapping boundary.
And why do you have to bother at all, when you get it
for free with the MSW StaticText?
Although the native control supports it, it is not portable and wx.StaticText will only assume multiple lines when there are \n's in the text.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!