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 disabled
April 14, 2010 at 9:35 pmPlease be sure that you only adjust menus and toolbars during one of the following event macros:
On_Default_CommandBars_Complete
– 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
On_CommandBars_Load_Complete
– 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
Regards,
Addam
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.