Re: want to capture a mouse click in an Entry
- From: Dan Hitt <dan hitt gmail com>
- To: Norbert de Jonge <mail norbertdejonge nl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: want to capture a mouse click in an Entry
- Date: Sun, 19 Feb 2017 00:23:41 -0800
Thanks Norbert, your solution works for me.
For whatever reason, i do not seem to have to grab the focus, although
maybe i'm subtly degrading conformance to some expected behavior. I'm
too dense to see what it is, though.
Also, for me, the name "button-press-event" works just as well as
"button_press_event", though maybe one is preferred over the other for
whatever reason.
Anyhow, thanks again, because i certainly was stuck before.
dan
On Sat, Feb 18, 2017 at 4:44 PM, Norbert de Jonge
<mail norbertdejonge nl> wrote:
I have an gtk_entry [...] and i would like to capture clicks
in the entry [...] depending on what modifier keys are held
You can use g_signal_connect (..., "button_press_event", G_CALLBACK
(Function), NULL); Then in Function, check if (event->button.state ==
GDK_SHIFT_MASK) {} else {}. Also do gtk_widget_grab_focus (widget);
in Function.
Best regards,
Norbert
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]