Applies to

RibbonTabButtonItem, RibbonLargeButtonItem, RibbonSmallButtonItem controls


The DefaultCommand property specifies whether a button has its own command when it is associated with a menu (a dropdown list of related commands). (Default is TRUE.)

When it is TRUE, the button has its own command, and users can click the upper part of the button to execute the command; when FALSE, the button does not have its own command, and users will expand or collapse the associated menu when clicking any part of the button.


In a painter

To enable the Default Command property

  • Select the Default Command check box on the General page of the control's Properties view.

In scripts

The DefaultCommand property takes a boolean value. To enable the default command for a ribbon button, use a line like the following:

rtb_1.DefaultCommand = TRUE