Re: Label Attributes

muppet said:

Mario Ospelt said:

I want to change the fontweight and fontsize of a Gtk2::Label. I saw in
the reference manual that I have to use a Gtk2::Pango::AttrList. But the
method new() is not available. How can I do that although? (I had also a
look at Gtk2::Text, but that seems to be deprecated.)

  # use Pango Markup, an html-like syntax...
  $markup_string = "My <big><span color=\"blue\">Cool</span> string</big>";

Yargh, when i saw AttrList i completely forgot about "fontweight and fontsize".

  $markup_string = '<span weight="bold" size="x-large">Some Cool Stuff</span>";

muppet <scott at asofyet dot org>

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