Keith Brown wrote:
Hi all. I'm writing a wxperl app that uses a text control to print
out information for the user. The program deals with some aspects of
the physics of nuclear spins.
I've been developing the program under Linux for a couple of years
with the intention of moving it over to Windows (and Mac eventually)
and offering it to the general physics community. Just this past week
I moved it over to Windows XP and, using ActivePerl and several
modules from the wxPerl repository at www.wxperl.co.uk, I tried to get
it running. Everything works properly except anything that modifies
the text. I can't seem to change colour or fonts under Windows XP
whereas everything works fine under Linux.
The text control object is defined using Wx::TextCtrl->new and the
text attribute object is defined using Wx::TextAttr->new in the usual
fashion. The textattr object is then used as needed to alter the text.
Works fine under Linux ... doesn't work under Windows.
Any ideas? Is there something that I might have missed?
I think for Win32 you should look at the style wxTE_RICH
From the docs:
Multi-line text controls support the styles, i.e. provide a possibility
to set colours and font for individual characters in it (note that under
Windows wxTE_RICH style is required for style support).
Please be aware that porting it to OSX might give similar problems that
I haven't been able to fix yet.
(Although now that I've read the above line from the docs I'm in doubt
if I tried it on a multi-line....)
Cheers,
Huub Peters