[MonoDevelop] How to add Combo Box on Toolbar

Marco Rolappe mrolappe.dev at googlemail.com
Thu Apr 29 09:48:37 EDT 2010

Am 28.04.2010 12:04, schrieb creek23:
> MonoDevelop have a Combo Box on its Toolbar for the user to indicate compile
> mode of either Debug or Release. How can I do the same with my program?

hej creek23,

you can use the ToolItem class for this. create an instance, add the
combo box to it and then add the tool item to your toolbar.

		var toolItem = new ToolItem ();
		var combo = new ComboBox (new string[] {"foo", "bar", "baz"});

		toolItem.Add (combo);

		toolbar1.Insert (toolItem, -1);

another possibility is to add a toolbar button to the toolbar and have a
popup menu displayed when the button is clicked.

hope this helps

More information about the Monodevelop-list mailing list