RibbonDropDown Class (2007 System)

Represents a list of items that a user can choose from and a list of Ribbon buttons that a user can click.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

[ToolboxBitmapAttribute(typeof(RibbonDropDown), "RibbonDropDown.bmp")]
public sealed class RibbonDropDown : RibbonControl

A RibbonDropDown can contain RibbonDropDownItem objects and RibbonButton controls.

You can add RibbonDropDownItem objects to the Items collection at design time and at run time, but you cannot add buttons to the Buttons collection at run time after the Ribbon has been loaded into Office.

The procedures below explain how to add RibbonDropDownItem objects and RibbonButton controls to a RibbonDropDown.

To add RibbonDropDownItem objects at design time

  1. Click the Items property in the Properties window.

  2. Click the ellipsis (...).

  3. In the DropDown Collection Editor, add, order, and edit new items.

To add a RibbonDropDownItem object at run time

  1. Create a new RibbonDropDownItem by using the RibbonDropDownItem constructor.

  2. Add the RibbonDropDownItem you created to the Items collection for this RibbonDropDown object.

You can add RibbonButton controls to a RibbonDropDown at design time.

To add RibbonButton controls at design time

  1. Click the Buttons property in the Properties window.

  2. Click the ellipsis (...).

  3. In the Button Collection Editor, add, order, and edit new button controls.

Some members of this type can be set only before the Ribbon is loaded into the Office application. For information about setting these properties, see Ribbon Object Model Overview.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show: