I'm using GTK# on monodevelop 3.0.4.6, on windows, I got a Gtk.EventBox
connected to a ButtonPressEventHandler
detecting single click (EventType.ButtonPress)
, but the double click (EventType.TwoButtonPress
) is NEVER triggered, does anyone has any idea why?
I even tried adding the "[GLib.ConnectBefore]"
attribute on my handler method, but it didn't change anything.
I tried with a TreeView
, a Button & an EventBox, all those where detecting single click, but none double...
Sample of my code :
// Somewhere in the constructor :
eventBox.ButtonPressEvent += new ButtonPressEventHandler(myButtonPressHandler);
// The called method
private void myButtonPressHandler(object obj, Gtk.ButtonPressEventArgs a)
{
EventButton ev = a.Event;
// single click
if (ev.Type == EventType.ButtonPress)
{
MyLogger.output("1");
}
// double click
else if (ev.Type == EventType.TwoButtonPress)
{
MyLogger.output("2");
}
}