[Gtk-sharp-list] Values from TreeStore

Malte Hildingson tds00mahi@tellus.thn.htu.se
Sun, 5 Oct 2003 14:19:43 +0200 (CEST)


TreeIter iter = new TreeIter ();
TreeModel model = myTreeStore;
int column = 0;
object value;

if (myTreeView.Selection.GetSelected (out model, ref iter)) {
	value = myTreeStore.GetValue (iter, column);
	/* do something with value */

you might want to listen to the event myTreeView.Selection.Changed as well
if you want it to work with the keyboard.


On Sat, 4 Oct 2003, Pablo Fischer wrote:

> Hi!
> I have a TreeView with 2 columns and with data :). I've been looking for
> it's to 'click' a button and get the value of the field selected, I know
> that I need to use GetStringFromIter or GetValue, but I dont understand
> how to get the value :(, somebody has an example?
> Thanks!