Octavian Rasnita wrote:
Hi Mattia,

Thank you very much! This is good news.
I've seen that I can set the colors of the text, and the alignment, but I couldn't find how to set a certain font with some attributes (bold, italic, underline). Could you please give me a short example?

  Just use ->SetFont( $font ) where $font is a font object with
the required attributes.

I've done:

my $style = Wx::TextAttr->new();
$style->Wx::TextAttr::SetTextColour(wxBLUE);
$style->Wx::TextAttr::SetBackgroundColour(wxGREEN);
$style->Wx::TextAttr::SetAlignment(wxTEXT_ALIGNMENT_CENTRE);

  You do not need to always use the full method name,
just using $style->SetAlignment(wxTEXT_ALIGNMENT_CENTRE)
will suffice; it is also more robust in case of class
hierarchy changes.

Also, do you have any idea if I can use superscripts and subscripts with the methods provided by the library?

  I do not event know if wxTextCtrl supports subscripts and superscripts
or not.

Regards,
Mattia

Reply via email to