Static text that wraps?

Murray Steele wrote:

If you use the flag wxST_NO_AUTORESIZE on the wxStaticText object, that
might do what you want.

Nope. wxStaticText won't add an implicit newline no matter what flags
you give it. The autoresize option is only useful if you change
the text. The control will change its size to accomodate the new text
(again without going onto multiple lines).

Robin Dunn wrote:

Customize wxGenStaticText in wxPython/lib/stattext.py and add some code
to handle the autowrapping.

I'll have a look at doing that. That code looks way easier to fix since
you have access to the drawing code (needed to measure how long the text
is) which you don't have overriding the StaticText class.

Roger

Hi and thanks for all the help
I am trying to use the dialog flag in the Print command but I can't work
out how to show the page numbers or alter any of the defaults.
Any help appreciated.
Greg

Robin Dunn wrote:

Customize wxGenStaticText in wxPython/lib/stattext.py and add some code
to handle the autowrapping.

I'll have a look at doing that. That code looks way easier to fix since
you have access to the drawing code (needed to measure how long the text
is) which you don't have overriding the StaticText class.

And the geometry management turned out to beyond my knowledge and
skill with wxWindows.

I am using wxHtmlWindow instead now, using GetBackgroundColour() on the
parent and making that the body bgcolour. It works perfectly when dealing
with the width. Unfortunately it won't request extra height if needed.
Amusingly, even if I set the HW_SCROLLBAR_NEVER style, it will still
come up with the horizontal scrollbar sometimes as you resize the parent
frame.

Roger

Greg Binns wrote:

Hi and thanks for all the help
I am trying to use the dialog flag in the Print command but I can't work
out how to show the page numbers or alter any of the defaults.
Any help appreciated.

You should be able to do it by setting values in the wxPrintDialogData that you give to the wxPrintDialog.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!