[Gtk-sharp-list] Double-Click in NodeView
Emiliano Gabriel Canedo
ecanedo at postresbalcarce.com.ar
Thu May 15 11:44:37 UTC 2014
Hello,
El mié, 14-05-2014 a las 19:59 +0200, Bertrand Lorentz escribió:
> 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
Bertrand: I tryed with all of this code, but still don't work. In this
moment, i access to the row data with the change event
"mynodeview.NodeSelection.Changed".
In C, this is possible:
http://en.wikibooks.org/wiki/GTK%2B_By_Example/Tree_View/Events
Could be that gtk# lacks some wrappers?
Thanks,
Emiliano
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20140515/e4e48194/attachment.html>
More information about the Gtk-sharp-list
mailing list