ccposton

Dark Lines in ToolbarMenu

Discussion created by ccposton on Feb 29, 2012
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.))

Outcomes