A Ter, 2003-10-21 �s 20:09, Hans Deragon escreveu:
> I posted this message on gnome-devel-list, but got no answer.  What I try to do 
> is trivial so I hope someone will have an answer.
> 
> Hans
> ----------------->
> Greetings.
> 
> 
>    Newbie here to programming Gnome/GTK.  I am using Python and Glade 2
>    to create an interface, and I successfully hooked a few widgets.  But
>    I have a problem with GTK::TreeView.  Following is my code:
> 
>      model = gtk.ListStore(gobject.TYPE_STRING)
>      model.set(model.append(), 0, "Test1")
> 
> 
>      # TVDepends is a GTK::TreeView widget (Thus, the TV prefix).
>      depends=xml.get_widget("TVDependants")
>      depends.set_model(model)
> 
> 
>      renderer = gtk.CellRendererText()
>      column = gtk.TreeViewColumn("Hosts", renderer, text=1)
>      num = depends.append_column(column)

  Regarding 'text=1':
        1. The '1' is the column number from where the text value is to be
obtained (for each row);
        2. Column numbers start from zero.
So, I am inclined to conclude you should replace that for 'text=0'.

  Hope it works.  Regards.

-- 
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[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