GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Oct 31, 2014 10:11 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: GTK background color
PostPosted: Wed Apr 02, 2008 8:14 am 
Offline

Joined: Wed Apr 02, 2008 8:04 am
Posts: 2
Hi,

I recently started programming pyhton and GTK after moving to ubuntu.
I have made a rather small application, this app shows a table the table consists of labels. These labels are being dynamically created, some of the labels are contained in eventboxes.
The whole table when finished is added to a scrolledwindow, with add_with_viewport(table). What I want to do is change the background color, the labels must be displayed against a blackboard.

I have used all kinds of methods on different objects, but nothing happens.
I tried to set the BG of the table, window.

Which method do I need to use?

thnx


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 10:05 am 
Offline
GTK+ Guru

Joined: Tue Feb 05, 2008 8:39 am
Posts: 130
Try this way
Code:
  GdkColor color;
  gdk_color_parse("#00FF00", &color);
  gtk_widget_modify_base(label,  GTK_STATE_NORMAL, &color);


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 1:01 pm 
Offline

Joined: Wed Apr 02, 2008 8:04 am
Posts: 2
well I done it, just put the table in an eventbox, and use the method modify_bg(GTK_STATE,color)


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: Google [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