|
Re: Get value of selected treeview rows: msg#00065gnome.gtk+.python
Hi, You want something like this. model, rows = treeview1.get_selection().get_selected() for row in rows: iter = model.get_iter(row) print modle.get_value(iter, 0) -Chris On Mon, 13 Dec 2004 12:04:42 +0100, Marcus Habermehl <bmh1980de@xxxxxxxx> wrote: > Hello. > > I want to get the values of selected (multiple) rows in a gtk.TreeView. > > But I doesn't understand how I can do this. > > If I can only select one row, I get the value with > > entry1, entry2 = treeview1.get_selection().get_selected() > entry = entry1.get_value(entry2, 0) > > >From there I thought that this is correct. > > select1, select2 = treeselection1.get_selected_rows() > for item in select2[0]: > print select1.get_value(item, 0) > > But I become this error. > > Traceback (most recent call last): > File "./gpkgtool.py", line 116, in Rm > print select1.get_value(item, 0) > TypeError: iter must be a GtkTreeIter > > How can I get the values, now? > > Regards > > Marcus > > _______________________________________________ > pygtk mailing list pygtk@xxxxxxxxxx > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ > -- Christopher Lambacher lambacck@xxxxxxxxxxxx _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Building Public Information Terminal: 00065, Allan Irvine |
|---|---|
| Next by Date: | Re: pango font need refresh: 00065, Danny Milosavljevic |
| Previous by Thread: | Get value of selected treeview rowsi: 00065, Marcus Habermehl |
| Next by Thread: | Re: Get value of selected treeview rows: 00065, John Finlay |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |