i have pygtk treeview couple of columns. during runtime add new rows. each cell contains string. normaly, use gtk.cellrenderer each row, want set background color of each cell, according value inside cell. i tried couple of solutions, seems have create cellrenderer each cell, set text attribute , background color. seems little oversized, asked myself if there nicer solution problem. suggestions? you can define background , foreground treeview cells in fields of treeview data source. setup foreground , background attributes treeview columns values corresponding data source fields. below small example: import gtk test_data = [ { 'column0' : 'test00', 'column1' : 'test01', 'f': '#000000', 'b': '#ff00ff' }, { 'column0' : 'test10', 'column1' : 'test11', 'f': '#ff0000', 'b': '#c9c9c9' }, { 'column0' : 'test20', '...
Comments
Post a Comment