Hi,

hm I wanted to write such a component on my own to learn Gtk# a bit more
in detail.

With DrawingArea I got it working. Is this here the right way to do it?


public class PaintWidget : Gtk.DrawingArea
{
                
    public PaintWidget() : base()
   {
        Events = (Gdk.EventMask)Gdk.EventMask.ButtonPressMask;
   }
                
    protected override bool OnButtonPressEvent(Gdk.EventButton evnt)
   {
        Console.WriteLine("huhu");
        return true;
    }
}

Or is there a better way?

Greetings

Mike

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to