[Gtk-sharp-list] Drawing Area and Mouse Button Signals

John Luke John Luke <john.luke@gmail.com>
Tue, 24 Aug 2004 16:10:16 -0400


On Tue, 24 Aug 2004 19:19:57 +0000, Brad Taylor <brad@getcoded.net> wrote:
> Hi everyone,
> 
> I'm working on a research project in C# at my university which requires
> the use of the DrawingArea widget.  So far, my use of it is very basic,
> almost directly copying code from the Scribble example by Rachel
> Hestilow but for some reason, I am totally unable to receive
> button_press or motion_notify signals, however I receive expose_event
> and configure_event signals perfectly fine.  Has anyone ran into this
> problem?  I've attached my source just in case it might help.
> 
> Thanks so much.
> 
> -Brad
> 
> P.S.: I'm running latest mono and gtk-sharp from Debian Unstable.
> 
>

This sounds like one of those times you have to add events you want
your drawing area to receive, it doesn't get them all by default.  The
only example I can think of right now is list.cs in the monodoc
sources.

AddEvents ((int) EventMask.ButtonPressMask | (int)
EventMask.ButtonReleaseMask | (int) EventMask.KeyPressMask | (int)
EventMask.PointerMotionMask);