On Tue, 2003-02-11 at 02:38, Anthony Tekatch wrote:
> How can I get changes to ListStore to show up in the GtkTreeView?
> 
> I have used glade-2 to create my window. The following code snippet does
> not update the GtkTreeView that I named cat_clist.
> 
> cat_clist  = widgets.get_widget('cat_clist')
> model = gtk.ListStore(gobject.TYPE_STRING)
> cat_clist.set_model(model)
> iter = model.append()
> model.set(iter,0,"text")
> 
> 
> 
> Thanks in advance!

You have to append at least one column. Something like this:

renderer = gtk.CellRendererText()
col = gtk.TreeViewColumn( 'Title', renderer )
col.set_property( 'resizable', 1 )
col.add_attribute( renderer, 'text', 0 )
cat_list.append_column( col )


-- 
Thomas Speck <[EMAIL PROTECTED]>

_______________________________________________
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