4

If I append entries to treestore, I can see that the entries are there, but I cannot see any of the text for those entries. I do not know if I have to add a repaint or something, or if I should link the treestore columns to the treeview columns some way.

The problem (no text is displayed):

enter image description here

Columns added to treeview:

enter image description here

and the code I added to add entries to the tree:

# Code for other initialization actions should be added here.
treestore = self.builder.get_object("treestore1")

root = treestore.append(None,["from_test1","to_test1"])
treestore.append(root,["from_test2","to_test2"])

1 Answer 1

5

In your second screenshot, the Tree View Editor, you should right click each column you want to show text in and select Add child text to add a Gtk.CellRendererText to this column. The first property for the cellrenderer should be a value from the liststore you want to show in that column.

Same goes for a PixBuf, Spinner, Progress, etc columns.

Defining the treemodel columns Creating and linking to the cellrenderer

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .