Hi, I guess that what you want is:
model, iter = self.treeselection.get_selected () print model.get_value (iter, 0) # 0 is a column number, could be 1, 2 ... HTH, Eduardo Aguiar ----- Original Message ----- From: nephish <[EMAIL PROTECTED]> To: pygtk <[email protected]> Subject: [pygtk] big problem with treeview Date: Mon, 05 Sep 2005 12:47:05 -0500 > > Hello there, > i have managed to build a treeview and populated it with some data. > just one row, with some children. > > what i dont get now is how to retrieve a value of a selection. > > here is what i have so far. > > def on_CustTree_select_cursor_row(self, widget, *args): > self.treeselection = self.CustTree.get_selection() > self.treeselection.set_mode(gtk.SELECTION_SINGLE) > (self.model, self.treeiter) = self.treeselection.get_selected() > print self.model, self.treeiter > self.result = self.treeselection.select_iter(self.treeiter) > print self.result > > on_CustTree_select_cursor_row called with self.CustTree > <gtk.TreeStore object (GtkTreeStore) at 0xb70ed4dc> <GtkTreeIter at 0x8398dc8> > None > > how do i actually get a value out of this, i mean, how do i get a > single value out, like what i could put into a variable. Like a > string. > ? > let me know if you need more details to help me. i am still very new at this. > thanks > shawn > _______________________________________________ > pygtk mailing list [email protected] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- _______________________________________________ Search for businesses by name, location, or phone number. -Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
