Gtk.MenuBar Class
The MenuBar is a subclass of MenuShell which contains one to many MenuItem.

See Also: MenuBar Members

Syntax

public class MenuBar : MenuShell

Remarks

The result is a standard menu bar which can hold many menu items. Gtk.MenuBar allows for a shadow type to be set for aesthetic purposes.

C# Example

			
	using System;
	using Gtk;

	public class MenuApp {

		public static void Main (string[] args)
		{
			new MenuApp();
		}

		public MenuApp(){
			Application.Init();
			Window win = new Window ("Menu Sample App");
			MenuBar mb = new MenuBar ();
			Menu file_menu = new Menu ();
			MenuItem exit_item = new MenuItem("Exit");
			exit_item.Activated += new EventHandler (on_exit_item_activate);
			file_menu.Append (exit_item);
			MenuItem file_item = new MenuItem("File");
			file_item.Submenu = file_menu;
			mb.Append (file_item);		
			win.Add (mb);
			win.ShowAll ();
			Application.Run ();
		}



		public void on_exit_item_activate(object o, EventArgs args)
		{
			Application.Quit ();
		}

  

Requirements

Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)
Assembly Versions: 2.12.0.0