http://www.perlmonks.org?node_id=385677

busunsl has asked for the wisdom of the Perl Monks concerning the following question:

Now that packing wxPerl applications with PAR finally works comes the next problem:

Wx::STC does not work any longer, the program just segfaults.
That is no major problem, as the perl syntax highlighting was not as good as I had hoped.

So I switched back to Wx::TextCtrl.

And now the question: How do I change the font of the widget?

SetFont does nothing.
SetDefaultStyle and SetStyle have no effects on text that is typed.
The documentation and the examples don't tell anything about setting the font :-(

Replies are listed 'Best First'.
Re: wxPerl: Font in Wx::TextCtrl
by PodMaster (Abbot) on Aug 25, 2004 at 14:28 UTC
    Wx::STC does not work any longer, the program just segfaults.
    When you recompiled widgets, did you recompile STC? Didn't think so.
    How do I change the font of the widget?...
    *boggle* SetFont most certainly does something (it sets the font).

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      When you recompiled widgets, did you recompile STC? Didn't think so.

      :-)

      Yes, I did. In the beginning I wrote a shellscript to compile wxWidgets. It included STC and XRC.

      *boggle* SetFont most certainly does something (it sets the font).

      Yes it should, but it didn't for me. Now I think it was due to using the predefined fonts like wxSWISS_FONT and such.

      Using your way (SetFont(Wx::Font->new(...))) works just fine!

      Many thanks again!