GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sun Dec 21, 2014 5:18 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Font color of text in a GtkIconView/GtkTreeView?
PostPosted: Fri Jan 27, 2012 3:32 pm 
Offline
Familiar Face

Joined: Thu Sep 22, 2011 8:21 pm
Posts: 9
Hello. I'm new to GTK+. I'm using C++ with GTK+ 2.
Recently I ported a program of mine to an embedded system. The users would like simple theme support included (changing font, colors, etc).
I have most of this implemented via gtk_widget_modify_fg, gtk_widget_modify_bg, and gtk_widget_modify_base. I also have font handling via pango.

However, none of these change the font color of a GtkIconView or a GtkTreeView. How can I do that with code?

Thanks


Top
 Profile  
 
 Post subject: Re: Font color of text in a GtkIconView/GtkTreeView?
PostPosted: Tue Jan 31, 2012 6:51 am 
Offline
Familiar Face

Joined: Tue Jan 17, 2012 4:37 am
Posts: 7
I've not try this, but you might want to take a look to
Gtk::CellRendererText::property_background() or Gtk::CellRendererText::property_foreground(). Read this http://developer.gnome.org/gtkmm/stable ... rText.html. There are also ..._rgba and ..._gdk.


Top
 Profile  
 
 Post subject: Re: Font color of text in a GtkIconView/GtkTreeView?
PostPosted: Tue Jan 31, 2012 7:07 am 
Offline
Familiar Face

Joined: Tue Jan 17, 2012 4:37 am
Posts: 7
Or you might want to use markup (instead of "text"), such as
Code:
<span foreground='#00FF00'>My text</span>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group