Share via


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)

Syntax

'Declaration
<ToolboxBitmapAttribute(GetType(RibbonDropDown), "RibbonDropDown.bmp")> _
Public NotInheritable Class RibbonDropDown _
    Inherits RibbonControl
'Usage
Dim instance As RibbonDropDown
[ToolboxBitmapAttribute(typeof(RibbonDropDown), "RibbonDropDown.bmp")]
public sealed class RibbonDropDown : RibbonControl
[ToolboxBitmapAttribute(typeof(RibbonDropDown), L"RibbonDropDown.bmp")]
public ref class RibbonDropDown sealed : public RibbonControl
public final class RibbonDropDown extends RibbonControl

Remarks

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.

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      Microsoft.Office.Tools.Ribbon.RibbonComponent
        Microsoft.Office.Tools.Ribbon.RibbonControl
          Microsoft.Office.Tools.Ribbon.RibbonDropDown

Thread Safety

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

See Also

Reference

RibbonDropDown Members

Microsoft.Office.Tools.Ribbon Namespace

RibbonDropDown.Items

RibbonDropDown.Buttons

Other Resources

Ribbon Overview

Ribbon Designer

Ribbon Object Model Overview

How to: Get Started Customizing the Ribbon