[Gtk-sharp-list] Double-Click in NodeView

Bertrand Lorentz bertrand.lorentz at gmail.com
Wed May 14 17:59:43 UTC 2014


Hello,

On Wed, May 14, 2014 at 4:36 PM, Emiliano Gabriel Canedo <
ecanedo at postresbalcarce.com.ar> wrote:

>  Hello!
>
> I need capture the event "double-click" over a nodeview's selected row;
> don't find the event to realize that. I tryed to the nodeview's
> "ButtonPressEvent", but don't work. Any suggestions?
>
> This code don't work:
>
> *mynodeview.ButtonPressEvent += delegate(object o,
> Gtk.ButtonPressEventArgs args) {*
> *        if (args.Event.Type == EventType.TwoButtonPress)*
> *            Console.WriteLine("double-click");*
> *};*
>
> Without a nodeview, with all other widgets, works perfectly.
>

I think you need to set the proper EventMask on the GdkWindow of your
NodeView. See this StackOverflow answer for a code sample:
http://stackoverflow.com/questions/12445628/detecting-double-click-with-gtk

I don't remember for which widgets it's necessary, but that might explain
the difference you're seeing.

I hope this helps.

--
Bertrand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20140514/0188ad28/attachment.html>


More information about the Gtk-sharp-list mailing list