Gtk.ListStore.GetValue C# (CSharp) Method

GetValue() public method

public GetValue ( Gtk iter, int column ) : object
iter Gtk
column int
return object
        public object GetValue(Gtk.TreeIter iter, int column)
        {
            GLib.Value val = GLib.Value.Empty;
            GetValue (iter, column, ref val);
            object ret = val.Val;
            val.Dispose ();
            return ret;
        }

Usage Example

Exemplo n.º 1
0
        // load the phone book
        // Since we have SelectionMode.Multiple turned on we have to
        // jump through these hoops in GTK-2.0 to get a selection
        private void on_book_treeview_selection(object o, EventArgs args)
        {
            Gtk.TreeIter iter = new Gtk.TreeIter();
            //Value value = new Value(); delete me
            string selectionText = null;

            book_store.GetIterFirst(out iter);
            if (book.Selection.IterIsSelected(iter))
            {
                selectionText = (string)book_store.GetValue(iter, 0);
            }

            while (book_store.IterNext(ref iter))
            {
                if (book.Selection.IterIsSelected(iter))
                {
                    selectionText = (string)book_store.GetValue(iter, 0);
                }
            }

            // Ok now we can finally load the phone book
            foreach (Phonebook p in myPhoneBooks)
            {
                if (p.Name == selectionText)
                {
                    load_phone_book(p);
                }
            }
        }
All Usage Examples Of Gtk.ListStore::GetValue