Re: color label in windows ??

From: Date: Wed, 13 Mar 2002 23:39:50 +0000
Subject: Re: color label in windows ??
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1510@lists.php.net to get a copy of this message
AFAIK - you can not change the background color of a label - its one of the gtk's faq - I cant remember the work around - it was probably that you have to add the label to another widget. - if not try #gtk or #gnome - someone might squeek an answer or suggestion - otherwise find another gtk program that does something similar.. and look at the code.. you should be able to changed the foreground (fg) however. regards alan Steph wrote:
try 'bg' instead of 'base' ----- Original Message ----- From: "Roberto Villarreal" <roberto.villarreal@funktiontech.com> To: <php-gtk-general@lists.php.net> Sent: Wednesday, March 13, 2002 5:40 PM Subject: [PHP-GTK] color label in windows ?? Hi... I was wondering if I can set a color in a label in windows... I know it can be done, but i followed an example in the mailing list but it didn´t work for me... Here is my code, it doesnt work and it doesnt print any error message.. the label is still black :( $label_n = &new GtkLabel($label); $estilo_actual = $label_n->get_style(); $estilo_nuevo = $estilo_actual->copy(); $color = &new GdkColor('#FFFFFF'); $estilo_nuevo->base[GTK_STATE_NORMAL]=$color; $label_n->set_style($estilo_nuevo); Thanks for your help. Roberto Villarreal


« previous php.gtk.general (#1510) next »