1

The method I employed is

self.table.insert_column_with_attributes(-1, 'Node IP Address', IPAdd, text=0, background=3)

But I realized that the gaps between cells, or rather, the borders, do not apply the background color. Is there a good way to completely colorize that portion as well?

Table with background color

gpoo
  • 8,408
  • 3
  • 38
  • 53
elwc
  • 1,197
  • 2
  • 15
  • 25

2 Answers2

1

Try setting the "cell-background" property of the text renderer instead of setting the background of the column.

jeffmagill
  • 191
  • 1
  • 6
0

Try with following code sample

treeview.set_model(model)
col = gtk.TreeViewColumn("Header")
cell = gtk.CellRendererText()
treeview.append_column(col)
col.pack_start(cell, 0)
col.set_attributes(cell, text=0) 
cell.set_property('background', '#color')

For more gtk.CellRendererText Properties : CellRendererText

Janith Chinthana
  • 3,792
  • 2
  • 27
  • 54