3 weeks ago
I'm building a menu in ACT! called from a plugin. Within that menu is an item which has sub-menu items that pop out as you hover over it. The sub-menu items have been added and work but I get a double "blank" line in between each one. This is the routine I've written to add items to a menu. Can anyone see what I've done wrong? This works fine for other menu but not for sub-menus.
Private Shared Function AddMenuItem(ParentMenu As Act.UI.Core.CommandBarControl, URN As String, Text As String, Tooltip As String, Icon As System.Drawing.Icon, HasSeperator As Boolean, ByVal Handler As Act.UI.CommandHandler) As Act.UI.Core.CommandBarButton Dim NewMenu As Act.UI.Core.CommandBarButton NewMenu = New Act.UI.Core.CommandBarButton(Text, Tooltip, Nothing, URN, Nothing, Nothing) NewMenu.Icon = Icon If (Icon Is Nothing) Then NewMenu.DisplayStyle = Act.UI.Core.CommandBarControl.ItemDisplayStyle.TextOnly Else NewMenu.DisplayStyle = Act.UI.Core.CommandBarControl.ItemDisplayStyle.ImageAndText End If NewMenu.HasSeparator = HasSeperator ParentMenu.AddSubItem(NewMenu) _Act.RegisterCommand(URN, Handler, Act.UI.RegisterType.Shell) Return NewMenu End Function