[Gtk-sharp-list] Problem with MoveFocus eventhandler

Finn Gruwier Larsen finn at gruwier.dk
Thu Mar 16 16:13:07 EST 2006


I'm writing my first Gtk# program, and I'm having a problem with an 
event handler.

I have this code for the event handler:

private void windowFocusMoved(object o, EventArgs args)

Now I try to attach the event handler to an event like this:

this.MoveFocus += new EventHandler(windowFocusMoved);

When I run this code, I get this error message from Monodevelop:

Type=Error, Description=Operator `+' cannot be applied to operands of 
type `Gtk.Window.MoveFocus' and `System.EventHandler'(CS0019)

I'm really puzzled about this error message. I certainly don't try to 
apply the '+' operator, but the '+=' operator, at that should be the 
correct way to do it, I suppose.

Best regards,

Finn Gruwier Larsen

More information about the Gtk-sharp-list mailing list