[Gtk-sharp-list] Add MenuItem

Chris Howie cdhowie at gmail.com
Thu Aug 21 20:09:35 EDT 2008

On Thu, Aug 21, 2008 at 7:33 PM, innominate <natenate at gmail.com> wrote:
> Thanks that worked.  Only other thing was I had to do .Show() on the MenuItem
> and .ShowAll() on the Menu.
> Another odd thing: In the code generated by the MonoDevelop gui designer it
> is creating Actions and  ActionsGroups instead of menu items.  Then I guess
> generating the entire MenuBar using the ActionGroups and Actions.  Why are
> there two different ways to do it?, and are there advantage/disadvantages to
> the differnt ways?

Generally speaking, you can attach an Action to a toolbar button or a
menu item, and you can attach it to more than one.  The button and
menu item text will be fetch from the Action, and changes to the
Action will affect all widgets it's attached to.  So if you need to
disable the "save" action then you just do so, and all widgets with
that action, everywhere, will be disabled as well.

Chris Howie

More information about the Gtk-sharp-list mailing list