Пример #1
0
 //ACCION QUE CAMBIA EL COLOR DEL TEXTO PARA CUANDO SE GUARDA EN LA BASE DE DATOS
 void cambia_colores_fila(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 {
     if ((string)lista_almacenes.Model.GetValue(iter, 12) == "URGENTE")
     {
         if (cell.GetType().ToString() == "Gtk.CellRendererToggle")
         {
             (cell as Gtk.CellRendererToggle).CellBackground = "red";
         }
         if (cell.GetType().ToString() == "Gtk.CellRendererText")
         {
             (cell as Gtk.CellRendererText).CellBackground = "red";
         }
     }
     else
     {
         if (cell.GetType().ToString() == "Gtk.CellRendererToggle")
         {
             (cell as Gtk.CellRendererToggle).CellBackground = "white";
         }
         if (cell.GetType().ToString() == "Gtk.CellRendererText")
         {
             (cell as Gtk.CellRendererText).CellBackground = "white";
         }
     }
 }