[Gtk-sharp-list] Problem with MoveFocus eventhandler
Mike Kestner
mkestner at novell.com
Thu Mar 16 16:48:39 EST 2006
On Thu, 2006-03-16 at 22:13 +0100, Finn Gruwier Larsen wrote:
> Hi,
>
> 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)
> {
> statusbar.Pop();
> }
>
> 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)
MoveFocus is defined as:
public event Gtk.MoveFocusHandler MoveFocus
You need to attach a delegate of that type.
--
Mike Kestner <mkestner at novell.com>
More information about the Gtk-sharp-list
mailing list