Yann Le Boulanger wrote:
> Christopher Cole wrote:
>   
>> hey all, i'm confused as to why the following code doesn't work,
>> this seems like the most basic thing you could do for a treeview,
>> yet i don't see any text from my model being displayed when it's run:
>>
>>     
>
> you have to create a renderer per column, and you also have to tell the
> column in which column of the treestore it has to take the data. here is
> a working code for your example:
>
> cols = [ ' Date ', ' Time ', ' Event Type ', ' Message ']
>
> for i in cols:
>     renderer = gtk.CellRendererText()
>     col = gtk.TreeViewColumn(i, renderer)
>     col.add_attribute(renderer, 'text', cols.index(i))
>     view.append_column(col)
>
>   
gosh i spent so much time on that...thank you very much!

--Chris
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to