[Gtk-sharp-list] Adding a shortcut to menu or a button
ajselvig at gmail.com
Tue Aug 26 13:11:02 EDT 2008
I've put together a very basic sample that tries to use accelerators.
Clicking on the menu item's call the methods appropriately, but the
accelerators don't work. I used AccelMap.AddEntry() to map the
accelerators to paths, then told the menu items what their accelerator
paths were. Is more needed? I still can't figure out how to use
AccelGroup, as I don't know how to make an IntPtr closure (notice the
??? in the accelGroup.Connect() calls). The documentation for
AccelGroup says to use ItemFactory, but the documentation for
ItemFactory has "Obselete" and "Do not use" in it.
The sample code is attached. Help on this would be great, it doesn't
seem like it should be this complicated.
On Tue, Aug 26, 2008 at 12:03 AM, True Friend <true.friend2004 at gmail.com> wrote:
> I tried to use this shortcut but couldn't. I had created an Accelerator for
> Gtk.Toolbar.Action button in MD sidebar with Ctrl + o but it doesn't
> activate the button while on click activates it.
> Something more to do after adding key combination in md designer's sidebar?
> Muhammad Shakir Aziz محمد شاکر عزیز
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2029 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080826/f17739b1/attachment.bin
More information about the Gtk-sharp-list