[Gtk-sharp-list] retrieving the values behind a selected row in a treeview

Davy Brion davy.brion@pandora.be
Mon, 8 Sep 2003 20:17:03 +0000


Hey guys,

i have a treeview, and one of the columns is invisible and contains a 
reference to the original object that is represented in the other columns for 
that row.  I'd like to be able to retrieve that reference when the user 
clicks on one of the rows.

But i need some help with this because the documentation isn't very helpful 
(many methods don't have any explanations yet).  

So could anyone tell me how i can retrieve the values that are stored in the 
ListStore object that the TreeView is showing?

I'm assuming i need to use the GetSelected method of a TreeSelection object, 
and then try to access those values through the TreeIter object that i need 
to pass along to the GetSelected method, but i'm a bit confused about how to 
retrieve the values from that TreeIter...  the documenation lists the 
user_data, user_data2 and user_data3 fields, but how do u know which one 
corresponds to which column? What if u have more columns? Isn't there a 
'cleaner' way of retrieving those values? Or does it work differently from 
the way i think it works?  If anyone could shed some light on this issue, i'd 
very much appreciate it.

thx,
davy brion