[Gtk-sharp-list] Tree selection

George Farris farrisg@mala.bc.ca
19 Feb 2003 08:18:26 -0800

On Tue, 2003-02-18 at 19:49, Pokey the Penguin wrote:
> On Wed, 2003-02-19 at 03:19, George Farris wrote:
> > OK how the heck do I get a selected row of text out of the TreeView
> > widget?
> TreeIter iter = new TreeIter ();
> TreeModel model;
> mytreeview.Selection.GetSelected (out model, ref iter);
> You can then reference the iter to a hashtable of stored values to find
> the object it's associated with.

Sorry, object it's associated with, do you mean string object such as
text in a row or something else?  If iter is a pointer to the row can't
I just get the row string like:
	string s = mytree.getRow(iter);

wouldn't that sort of make sense?

mytreeview.Selection.GetSelected (out model, ref iter);

The "out" and "ref" are keywords right?  I'm not familiar with them,
more reading:-)  Doesn't GetSelected return a boolean?  It seems then
that "ref" would work something like &iter in C, is that correct?