Re: Styling Clists
| From: | Gregory Wild-Smith | Date: | Fri, 12 Nov 2004 16:12:40 +0000 |
| Subject: | Re: Styling Clists | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5231@lists.php.net to get a copy of this message | ||
You actually solved my problem.. I was using BG not BASE... *sigh* my problem entirely...
I added a note to the docs to help any other people that were having this problem. The appliction of the style properties does seem kind of random! Anyhow, thanks everyone for the help.
- Greg
----- Original Message ----- From: "Madeleine D." <mmdrake@bctonline.com>
To: "Gregory Wild-Smith" <greg@twilightuniverse.com>; <php-gtk-general@lists.php.net>
Sent: Thursday, November 11, 2004 5:20 PM
Subject: Re: [PHP-GTK] Styling Clists
Greg - Without seeing your code, I can't say for sure what the problem is. But I can give you a sample of one I use in our app. function PMformatRowBase1($clist,$row) { $color1 = &new GdkColor('#000000'); $color2 = &new GdkColor('#ffe4c4'); $style = &new GtkStyle; $style->fg[GTK_STATE_NORMAL] = $color1; $style->base[GTK_STATE_NORMAL] = $color2; $style->font = gdk::font_load("-adobe-tahoma-medium-r-normal--*-120-*-*-*-*-*-*,*"); $clist->set_row_style($row,$style); } This is set_row_style, instead of set_cell_style, but the principle should be the same. Hope that helps. Madeleine D. At 02:25 PM 11/11/04 -0000, you wrote:A (hopefully) quick question for you. I'm trying to colour the cells of a clist depending on their value, however the GtkStyles seem to have no effect, either with set style or the set_cell_style methods. None. Set_background works.. but the rest just stays rather annoyingly white, and set background only works on rows too (useful, but not what I need). Anyone have any clues? If it helps.. I'm using Win32. I thought it was perhaps the properties I was using (FG, BG and TEXT, just to make sure) but nothing seems to work at all... This is a really fundemental part of the prototype software I'm creating, and I thought it would be easy.. seemingly not. - Greg. -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php