コード例 #1
0
ファイル: ConnectionsPage.cs プロジェクト: tabrath/meshwork
        private void connectionList_ButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
        {
            TreePath path;

            if (connectionList.GetPathAtPos((int)args.Event.X, (int)args.Event.Y, out path))
            {
                connectionList.Selection.SelectPath(path);
            }
            else
            {
                connectionList.Selection.UnselectAll();
            }

            if (args.Event.Button == 3)
            {
                ConnectionMenu menu = new ConnectionMenu(connectionList);
                menu.Popup(GetSelectedConnection());
            }
        }
コード例 #2
0
        private void connectionList_ButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
        {
            TreePath path;
            if (connectionList.GetPathAtPos ((int)args.Event.X, (int)args.Event.Y, out path))
                connectionList.Selection.SelectPath (path);
            else
                connectionList.Selection.UnselectAll ();

            if (args.Event.Button == 3) {
                ConnectionMenu menu = new ConnectionMenu (connectionList);
                menu.Popup (GetSelectedConnection ());
            }
        }