[Gtk-sharp-list] GtkTree.Selection Color woes

Juan Lupión jlupion@alcornoque.jazztel.es
Tue, 13 Apr 2004 23:33:04 +0200


Hi,

 I'm trying to select the values of a GtkTree widget using the following code.  

At first I thought my code was obviously wrong as nothing seemed to happen; 
but after checking that SelectItem() is being called and setting the 
RulesHint properties on the tree widget I've found that if the selected item 
turns to be one with the darker backgrounds, the background of that item 
becomes white.    If I click any item in the treeview5 widget the selection 
changes to that item that gets a blue background (according to my current gtk 
Theme, BlueCurve).  

Is there any Glade property I should adjust?  Any clues are appreciated... 


// treeview5 is the Tree widget and lista_zonas is the
// relevant ListModel
// The column 1 is not visible and contains a unique id for
// each Model member.  We want to select the row that 
// has unique id == id_zona

TreeIter iter_zonas;
lista_zonas.GetIterFirst (out iter_zonas);
			    
treeview5.Selection.UnselectAll();
do 
 {
    	int id_zona_iter = (int)(lista_zonas.GetValue (iter_zonas,1));
    	if (id_zona_iter == id_zona) {
		treeview5.Selection.SelectIter (iter_zonas);
	}
}   while (lista_zonas.IterNext (out iter_zonas));