Adding and removing buttons

 

You can change what buttons appear in a specific button bar.

To enable, gray, or remove command buttons--but not change which button bar they appear in--use the SetButtonStatus or BatchSetButtonStatus transactions. With SetButtonStatus, the button bars are automatically refreshed. With BatchSetButtonStatus, you must use RebuildButtonBar to update the button bars.

Note that enabling or graying a command in a button bar also enables or grays that command in a menu.

To find out the current status of a command button, use GetButtonStatus.

To quickly re-enable all buttons and rebuild the button bars, use ResetMenus.

To change which buttons appear in which button bar, use the AddButton and DeleteButton transactions. With these transactions, you can add or remove individual buttons from the Tool Bar and View Ribbon.

To define the entire button bar at once, use the SetButtonBarDefinition transaction.

To find out what buttons a particular button bar contains, use the GetButtonBarDefinition transaction.

See also