[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Formatting in wxStaticText?


Phil Martin wrote:
The docs for wxStaticText say that they allow newlines. But newlines in xrc file strings are ignored by the wxStaticText control in InformWarning - the "\n" sequence appears in the dialog verbatim.

Anyone know anything about this?

Not explicitly but wxStaticText is an old control which is a bit of
a pain. It breaks lots of rules not least because it isn't a
real GTK widget (it's painted by the window behind it). I paint
the status line using the wxCamArtControl class instead. That
doesn't do wrapping either though it would be relatively small
amount of work to make it do it (especially if you want wrapping
at explicit newlines) as it already has a tokenizing formatter
to do the status line chopping.

Newlines are barred from labels in XRC I think, not least because
they are not compatible with gettext and translation (see the
zillion warnings on build).

I do know that if you want it to wrap, you have to EXPLICITLY
call the ->Wrap() method on it - perhaps that processes the

What happens if you leave it blank in XRC, then do a
SetStringGadgetValue() in your code?