Colored text



Hi list,
I would like to write a C++ program in Gtkmm which write blue text in DrawingArea. I don't know how I can do this. I can write black text but can't change color.
I try change color like this:

Pango::Attribute attr;
attr.create_attr_background(100, 200, 700);
Pango::AttrList attrList;
attrList.change(atrybuty);

I can compile program but when program is execute then it is terminate and I can see:
"Pango-CRITICAL **: pango_attribute_copy: assertion `attr != NULL` failed".

How I can write blue text.
Please, help me.

Thanks
pch



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