Re: GtKCelrendererToggle and background color

From: Date: Tue, 03 Oct 2006 14:00:33 +0000
Subject: Re: GtKCelrendererToggle and background color
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7306@lists.php.net to get a copy of this message
Sven Siwek wrote: > > I have a little question. > Why is it not possible to set the background for that renderer? > > I do have a very long column header for a toggle and can?t change the > backgroundcolor to adapt the color to the other renderers. > > Would be very nice if that property can be set. > You mean something like this? http://www.kksou.com/php-gtk2/gif/0045.gif Sample code: // display alternate row color function format_col($column, $cell, $model, $iter) { $path = $model->get_path($iter); // get the current path $row_num = $path[0]; // note 2 $row_color = ($row_num%2==1) ? '#dddddd' : '#ffffff'; $cell->set_property('cell-background', $row_color); } Complete sample code at: http://www.kksou.com/php-gtk2/articles/use-GtkCellRendererToggle---Part-2---process-selection.php -- View this message in context: http://www.nabble.com/GtKCelrendererToggle-and-background-color-tf2371602.html#a6620836 Sent from the Php - GTK - General mailing list archive at Nabble.com.

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