Esempio n. 1
0
        private void TreeView_ButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
        {
            if (args.Event.Button == 3)
            {
                Gtk.TreeViewDropPosition pos;
                Gtk.TreePath             path;
                Gtk.TreeIter             iter;

                if (_gtkTreeView.GetDestRowAtPos((int)args.Event.X, (int)args.Event.Y, out path, out pos) && _gtkTreeView.Model.GetIter(out iter, path))
                {
                    var paths = _gtkTreeView.Selection.GetSelectedRows().ToList();
                    if (paths.Contains(path))
                    {
                        args.RetVal = true;
                    }
                }
            }
        }