Hiding "Main Menu" commands...


Author
Message
Billy Barnes
Billy Barnes
Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)
Group: Forum Members
Posts: 13, Visits: 20
When using this code to hide commands on the main menu of the Diagram Toolbar, I found that the "Format" and "Action" DiagramCommandRange are swapped. So when I indicate the Format range, I get the commands for Action and vice versa.

manager.Toolbars["Main Menu"].Commands[(int)DiagramCommandRange.Tools].Commands

manager.Toolbars["Main Menu"].Commands[(int)DiagramCommandRange.Action].Commands
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Billy,

This enum is not created with this purpose.
The actual problem is that Commands with index 0 is internally added Pendant command and when you use this enum to get the index of desired command you are getting the one before.
If you still want to use this enum you should shift the index value with 1.

Hope it helps.

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search