Originally posted by Luke
View Post
tvc.SetCellDataFunc (crt, (TreeViewColumn col, CellRenderer cell, ITreeModel model, TreeIter iter) => {
var path = model.GetPath (iter);
int [] ind = path.Indices;
byte r = (byte)(225 - (25 * (5 - Math.Min (5, ind.Length))));
byte g = (byte)(225 - (5 * (5 - Math.Min (5, ind.Length))));
byte b = (byte)(225 - (20 * (5 - Math.Min (5, ind.Length))));
cell.CellBackgroundGdk = new Gdk.Color (r, g, b);
});
Comment