1 Reply Latest reply on Nov 5, 2014 7:12 PM by Seth Ruhan

    Adding menu and toolbar flyouts, with command manager FlyoutGroups

    Ron Bates

      First I call AddCommandItem2 on ICommandGroup, where the last parameter is a bitwise flag to indicate if commands should ALSO be added to their equivalent toolbars and menus.


      I set this to (int)(swCommandItemType_e.swMenuItem | swCommandItemType_e.swToolbarItem)


      I also set my CommandGroup instance HasToolbar and HasMenu to be true.


      So far, so good.  My command manager has my command and it also shows up in a menu and a toolbar.



      Then I add a flyout in my command manager with CreateFlyoutGroup.  But these commands only appear in my command manager...and not in my menu and toolbar?? 


      Is it possible to automatically have flyout groups be added to an add-ins menu and toolbar...like it is for AddCommandItem2?

        • Re: Adding menu and toolbar flyouts, with command manager FlyoutGroups
          Seth Ruhan



          Flyouts can be added manually so it might be possible, But I have never found a way


          However to create flyouts in menu you need to make it manually with indented menu's


          cmdGroup = iCmdMgr.CreateCommandGroup2(mainCmdGroupID, Title, ToolTip, "Hint", 5, ignorePrevious, cmdGroupErr)

          Dim SubGroup As ICommandGroup = iCmdMgr.CreateCommandGroup2(99, Title & "\Tests", "Test toolTip", "Hint", 5, ignorePrevious, cmdGroupErr)

          cmdGroup1.AddCommandItem2("Custom Properties", -1, "CP", "CP", 0, ....

          cmdGroup1.AddCommandItem2("Test Button", -1, "test", "test",.....