Re: Styling Clists

From: Date: Thu, 11 Nov 2004 17:20:12 +0000
Subject: Re: Styling Clists
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5226@lists.php.net to get a copy of this message
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 > >

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