This doesn't work, because the I use the wxEXPAND. And I have to,
beacause I if don't, the text gets wrapped.
In which sizer are you adding your static text?
Sometimes may be helpful to add one more sizer (typically wxBoxSizer)
containing only one widget.
wxFlexFridSizer.
You'll probably be better off to use the sizer alignment flags to center
the widget within the space given to it by the sizer instead of
expanding the widget to fill the space and trying to get the native
widget to center it. The former works everywhere, but the latter
depends on a feature that the native widget may or may not implement.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
Allow the text item to expand horizontally, but not vertically.
Is this possible? At least in the 2.6.2, there's only a wxEXPAND flag
available.
I'd eventually like to split it into wxEXPAND_VERTICALLY and
wxEXPAND_HORIZONTALLY to make this easier, but it can still be done
currently with a bit more work. You need to put the item in a box sizer
and let it do the horizontal expansion and with an
wx_ALIGN_CENTER_VERTICAL flag. Then put the box sizer in the flex grid
sizer with wxEXPAND. That will make the box sizer fill the cell in both
directions, but the widget will be expanded/centered as directed by the
box sizer.