Home › Forums › General XMetaL Discussion › After adding items to a builtin menu, the items remain disabled › Reply To: After adding items to a builtin menu, the items remain disabled
Reply to: After adding items to a builtin menu, the items remain disabledApril 14, 2010 at 9:35 pm
Please be sure that you only adjust menus and toolbars during one of the following event macros:
– must be in Startup mcr file, called to modify global/built-in toolbars used across all document types
– macros bound via OnAction property assignment must also be inside the Startup mcr file
– can be in Startup or document-level mcr, called when toolbar is first loaded.
– Check Application.CommandBars.Name to determine if global/built-in or dtd-specific toolbar collection
– macros bound via OnAction property assignment must be inside corresponding mcr file with On_CommandBars_Load_Complete
P.S. The CommandBarControl.Enabled property doesn't effect enable/disable state property…it is a long standing bug. Instead, be sure to call Application.DisableMacro() during On_Update_UI if you need to grey out a menu item or toolbar button of your making.