Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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"])
share|improve this question

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer
    
Thanks I got it –  ender Aug 20 '12 at 17:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.