GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GTK background color

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
Rodepanda



Joined: 02 Apr 2008
Posts: 2

PostPosted: Wed Apr 02, 2008 8:14 am    Post subject: GTK background color Reply with quote

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
Back to top
Wolfgang
Familiar Face


Joined: 05 Feb 2008
Posts: 37

PostPosted: Wed Apr 02, 2008 10:05 am    Post subject: Reply with quote

Try this way
Code: (C)
1
2
3
4
5

  GdkColor color;
  gdk_color_parse("#00FF00", &color);
  gtk_widget_modify_base(label,  GTK_STATE_NORMAL, &color);
Back to top
Rodepanda



Joined: 02 Apr 2008
Posts: 2

PostPosted: Wed Apr 02, 2008 1:01 pm    Post subject: Reply with quote

well I done it, just put the table in an eventbox, and use the method modify_bg(GTK_STATE,color)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP