comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Mouse Clicks in a Drawing Area
Date: Tue, 4 Feb 2014 09:52:16 +0100
Date: 2014-02-04T09:52:16+01:00	[thread overview]
Message-ID: <qtjn56kj6yh4$.1iqlazgzyni86.dlg@40tude.net> (raw)
In-Reply-To: 52f08d46$0$9122$703f8584@news.kpn.nl

On Tue, 4 Feb 2014 07:46:51 +0100, ldries46 wrote:

> I do want to draw something at a certain point in a Drawing_Area. That point 
> should be derived from a mouse click.
> To do this I have created a handler "On Button_Press".

[...] 

> Both program build faultless.
> I put a breakpoint inside the On_Button_Press function at a point where it 
> should always be reached.
> Running the program and clicking within the drawn area that breakpoint is 
> never reached and the program runs without reporting an error.
> I am using Gtk 3.4 and GPS.
> What do I do wrong?

By default the button-press-event and the button-release-event signals are
filtered out for a widget. See:

https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-button-press-event

You must enable their propagation in order to be able to handle them. Use
Set_Events for this purpose on the widget with the appropriate event mask.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2014-02-04  8:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04  6:46 Mouse Clicks in a Drawing Area ldries46
2014-02-04  8:52 ` Dmitry A. Kazakov [this message]
2014-02-04 10:08   ` ldries46
2014-02-04 10:43     ` dontspam365
2014-02-04 10:44     ` Dmitry A. Kazakov
2014-02-04 14:01       ` ldries46
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox