Label Colors

From: Date: Sun, 12 Dec 2004 18:38:05 +0000
Subject: Label Colors
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5338@lists.php.net to get a copy of this message
I have spent the last day or so trying to figure out how to set the color/font on a label which come to find out it was in the main docs just couldn't find it right away. My question is, is there any way to make to the text of two different labels different colors? every way i try to do it it seems to just change all the labels to same color/font this is my latest try and i get nothing they are all the same color they all go orange $label[1] = &new GtkLabel("This is my label 1"); $label[2] = &new GtkLabel("This is my label 2"); $style[1] = $label[1]->get_style(); $font[1] = gdk::font_load("-*-helvetica-medium-r-normal--*-180-*-*-*-*-*-*"); $style[1]->font = $font[1]; $color[1] = &new GdkColor( 'blue');; $style[1]->fg[GTK_STATE_NORMAL] = $color[1]; $label[1]->set_style( $style[1]); $style[2] = $label[2]->get_style(); $font[2] = gdk::font_load("-*-helvetica-medium-r-normal--*-180-*-*-*-*-*-*"); $style[2]->font = $font[2]; $color[2] = &new GdkColor( 'orange');; $style[2]->fg[GTK_STATE_NORMAL] = $color[2]; $label[2]->set_style( $style[2]); any help would be very very nice i noticed someone asked this question like 6 months ago but i couldnt' find a response if it is somewhere on the site i am sorry for missing it but i have looked everywhere i can and browsed the archives of this mailing list. Steven

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