[Gtk-sharp-list] accelgroup.Connect problem

Davide Lasagna lasagnadavide at gmail.com
Sun Apr 11 14:57:27 EDT 2010


Hi all,
I'm new to mono although i've had some previous experience with pygtk. I
have  a problem with an accelgroup. What i want to do is to bind Alt+left to
a calback.

Here is the code:

AccelGroup accelgroup = new AccelGroup();
this.AddAccelGroup(accelgroup);
accelgroup.Connect(Gdk.Key.Left, Gdk.ModifierType.MetaMask,
AccelFlags.Visible, HandleGobackClicked );

Compiling this gives:
./MainWindow.cs(62,36): error CS1502: The best overloaded method match for
`Gtk.AccelGroup.Connect(uint, Gdk.ModifierType, Gtk.AccelFlags,
System.IntPtr)' has some invalid arguments
/usr/lib/cli/gtk-sharp-2.0/gtk-sharp.dll (Location of the symbol related to
previous error)
./MainWindow.cs(62,36): error CS1503: Argument `#1' cannot convert `Gdk.Key'
expression to type `uint'


How can i solve it? The docs are not very complete on this, and i can't find
tutorials or examples.

Thanks for pointing me in the right direction.

Davide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20100411/f3cecebd/attachment.html 


More information about the Gtk-sharp-list mailing list