[Gtk-sharp-list] Help with dynamically adding to a Menu - what am I doing wrong

alanb alan.battersby at ntlworld.com
Mon Feb 22 16:22:03 EST 2010

Was playing around so code first given was not correct

void setWindowChoices()
		foreach(DockItem di in df.GetItems())
			MenuItem mnuitm = (MenuItem)WindowsAction.CreateMenuItem();
			mnuitm.Name = di.Label;
			mnuitm.Visible = true;
			mnuitm.Sensitive = (di.Status == DockItemStatus.Dockable);

I assumed that CreateMenuItem added a sub menu item to the Action but I cant
get it to work.

View this message in context: http://n4.nabble.com/Help-with-dynamically-adding-to-a-Menu-what-am-I-doing-wrong-tp1565136p1565159.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list