Hi,

I have one question:

I wanna write a custom widget, that should handle requests. What is the
better way:

To override the methods:

                
    protected override bool OnButtonPressEvent(Gdk.EventButton evnt)
   {
        Console.WriteLine("Pressed");
        return true;
    }


Or adding a new handler:


    public MyWidget() 
     { 
            ButtonPressEvent += ButtonPressed; 
     } 
                                       
     public void ButtonPressed(object o, EventArgs args) 
     { 
           Console.WriteLine("Pressed"); 
     } 


Is there any advantage, or disadvantage?

Greetings

Mike

_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to