4

I am doing a simple file browser in python and GtkBuilder. I am using a Treeview that has one TreeViewColumn with cells that are rendered like:

self.cell = gtk.CellRendererText()

As I mentioned I am creating a file browser. So I want to have a small icon before the text in each cell, that icon will be the folder,file icon. Any idea on how can I do that?

dlock
  • 9,447
  • 9
  • 47
  • 67

1 Answers1

6

You don't need to extend CellRendererText, you can insert more than one CellRenderer per column using gtk.TreeViewColumn.pack_start().

You will want to have a CellRendererPixbuf to the left of your CellRendererText.

anthony
  • 40,424
  • 5
  • 55
  • 128