Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I do this:

// toolsView is the ToolbarControl
IToolbarMenu2 toolbarMenu = new ToolbarMenuClass();
toolbarMenu.Caption = "Top";
toolbarMenu.AddItem( new NewDocumentCommand( synchronizer ), 0, 0, false, esriCommandStyles.esriCommandStyleIconAndText );
toolbarMenu.AddItem( new OpenDocumentCommand( synchronizer ), 0, 1, false, esriCommandStyles.esriCommandStyleIconAndText );
toolbarMenu.AddItem( new SelectDocumentCommand( synchronizer ), 0, 2, false, esriCommandStyles.esriCommandStyleIconAndText );
toolbarMenu.SetHook( toolsView.Object );
toolsView.AddItem( toolbarMenu, 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconAndText );

The menu items show in the drop down but with thick dark lines between each item. When I use a class derived from IMenuDef then I don't get any lines between the items. Why are the dark lines appearing? What can I do to get rid of them? (I would prefer to use a IMenuDef derived class but I cannot because my tools and commands are not registered. (I'm not building them for distribution.))

share|improve this question
Bug. Removed form and rebuilt from scratch and behavior went away. – Chaz Mar 7 '12 at 21:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.