GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Apr 19, 2014 10:07 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: how to change
PostPosted: Wed May 20, 2009 2:05 pm 
Offline

Joined: Wed May 20, 2009 6:39 am
Posts: 3
Hi all,

i want to have the selected item in my iconview to be shown with another color than the standard blue.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 20, 2009 4:38 pm 
Offline
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hello.

This color is defined in user's theme and should not be modified just because you feel it looks better with some other color.

If the color isn't just cosmetic, you should embed rc string in your application and parse it with gtk_rc_parse_string.

Search forums a bit and you should be able to find some sample code that uses embedded rc strings.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 21, 2009 8:06 am 
Offline

Joined: Wed May 20, 2009 6:39 am
Posts: 3
thanq for some help if possible can u post some code snippet related to this


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 21, 2009 8:22 am 
Offline
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hi.

Before mangling with rc strings, you should probably know a bit about how themes work. Good starting point would be this tutorial: http://live.gnome.org/GnomeArt/Tutorials/GtkThemes

Sample code can be found here: http://gtkforums.com/viewtopic.php?t=2896#8514. This code shows how to modify grid lines in tree view, but you should be able to build your own string that will modify base color when item is selected.


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

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 2 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