I have a scrollable Gtk window that I am also trying to connect to the PopupMenuHandler function:
this.scrolledwindow1.PopupMenu += HandlePopupMenu;
and HandlePopupMenu looks like this:
[GLib.ConnectBefore]
public void HandlePopupMenu(object o, PopupMenuArgs args)
{
Console.WriteLine("test");
Gtk.Menu mbox = new Gtk.Menu();
Gtk.MenuItem Test = new Gtk.MenuItem("test");
Test.Activated += delegate(object sender, EventArgs e) {
Console.WriteLine("test");
};
mbox.Append(Test);
mbox.ShowAll();
mbox.Popup();
}
My problem is that this event is never fired when I right-click on a scrollable window. which I suppose should be based on this . There is only one other event in ScrollEvent, and nothing happens with the keyboard or mouse buttons. Can someone tell me why this is not working?
source
share