Dear all,
I would like to change the font size of a label.
Looking on the documentatation the way to go seems to use
Gtk::Label::set_attributes()
I have tryed so, but I get a segmentation fault.
Here is my code:
Gtk::Label *label = manage( new Gtk::Label("text")
);
Pango::FontDescription fd;
fd.set_size(30);
Pango::Attribute attr =
Pango::Attribute::create_attr_desc(fd);
Pango AttrList labelAttributes;
labelAttributes.insert( attr );
label->set_attributes( attr );
I get a segmentation fault from
labelAttributes.insert( attr )
Can anyone suggest why?
I have also tryed to use
Pango::Attribute::create_attr_size, and I had the same resutl.
Thank you in advance.
Regards,
Enrico Costanza |