FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 12-04-2008, 10:41 AM
pch
 
Default 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-04-2008, 04:59 PM
"Boyd Stephen Smith Jr."
 
Default Colored text

On Thursday 04 December 2008, pch <pawelcholewinski@wp.pl> wrote
about '[OT] Colored text':
>Hi list,
>I would like to write a C++ program in Gtkmm which write blue text in
>DrawingArea.

This isn't a development list. You might try asking on the gtkmm (or gtk
or gnome) mailing lists. It's unlikely you'll get an answer to these
types of questions here.

>I try change color like this:
>
>Pango::Attribute attr;
>attr.create_attr_background(100, 200, 700);
>Pango::AttrList attrList;
>attrList.change(atrybuty);

Does this code actually compile? In that case, you've left out something
that must be important, because I don't see where you've
declared "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".

You should be able to use gdb to help you debug this. You'll probably want
symbols for your libraries (in *-dbg packages) if you try.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss03@volumehost.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.org/ \_/
 

Thread Tools




All times are GMT. The time now is 07:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org