dropDown
This control allows the user to select from a list of possible choices.
![]() |
The value returned is the list index.
In the object model this is RibbonDropDown
A dropdown control can contain items or even buttons after its selection items.
This control is similar to a gallery control but the gallery control also allows items to be arranged in a grid.
You cannot manipulate the buttons collections at runtime but you can show and hide existing buttons to create the equivalent of a dynamic list.
RibbonDropDown has an Items collection that contains RibbonDropDownItem controls.
This collection can be modified at runtime.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="CustomTab" label="My Tab">
<group id="Group1" label="MyGroup">
<dropDown id="MyDropDown"
sizeString="AAAAAAAAAAAAAAAAAAAAAAA"
onAction="DropDown_OnAction"
getEnabled="DropDown_OnGetEnabled"
getLabel="DropDown_OnGetLabel"
getSelectedItemIndex="DropDown_OnGetSelectedItemIndex"
getShowLabel="DropDown_OnGetShowLabel"
getVisible="DropDown_OnGetVisible">
<item id="One" label="Mon"/>
<item id="Two" label="Tue"/>
<item id="Three" label="Wed"/>
<button id="button" label="Another Button" onAction="Button_OnAction" />
</dropDown>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Attributes (properties)
| enabled | (Enabled) "true" | "false" |
| id | (Id) |
| idMso | |
| idQ | |
| image | (Image) |
| imageMso | (OfficeImageId) |
| insertAfterMso | |
| insertAfterQ | |
| insertBeforeMso | |
| insertBeforeQ | |
| keytip | (KeyTip) |
| label | (Label) |
| screentip | (ScreenTip) |
| showImage | "true" | "false" |
| showItemLabel | "true" | "false" |
| showItemImage | "true" | "false" |
| showLabel | "true" | "false" |
| size | (ItemImageSize) size of the images displayed |
| sizestring | (SizeString) "xxxxxxxx" ?? |
| supertip | (SuperTip) |
| tag | (Tag) |
| visible | (Visible) "true" | "false" |
| (GenerateMember) | |
| (Buttons) add buttons to the list, can only be done at design-time | |
| (Items) add items to the list can also be done at run-time | |
| (Modifiers) |
Children
This control can contain the following controls
| Button | |
| Item |
C# Events (design-time)
These events can be accessed if you use the Visual Studio Ribbon Designer.
| ButtonClick | |
| ItemsLoading | The ItemsLoading event is raised before the dropdown is displayed |
| SelectionChanged | OnAction attribute - This is the design-time equivalent of the run-time OnAction callback event |
void DropDown_ButtonClick(object sender,
RibbonControlEventArgs e)
{
}
void DropDown_ItemsLoading
{
}
void DropDown_SelectionChanged(
{
}
Callbacks (run-time)
| onAction | DropDown_OnAction - Fired when you choose an item in the drop-down. This is the run-time equivalent to the design-time SelectedChanged event |
| getEnabled | DropDown_OnGetEnabled - Whether the drop-down is enabled or not. |
| getImage | DropDown_OnGetImage - Gets the image associated with the drop-down. |
| getItemCount | DropDown_OnGetItemCount - Gets the total number of items to display in the drop-down. |
| getItemID | DropDown_OnGetItemID - Gets the ID for a particular item. (The "Generate Callbacks" inside the Custom UI Editor does not generate this) |
| getItemImage | DropDown_OnGetItemImage - Gets the image for a particular item. |
| getItemLabel | DropDown_OnGetItemLabel - Gets the label for a particular item. |
| getItemScreentip | DropDown_OnGetItemScreentip - Gets the screentip for a particular item. (The "Generate Callbacks" inside the Custom UI Editor does not generate this) |
| getItemSupertip | DropDown_OnGetItemSupertip - Gets the supertip for a particular item. (The "Generate Callbacks" inside the Custom UI Editor does not generate this) |
| getKeytip | DropDown_OnGetKeytip - Gets the keytip to display with the drop-down. |
| getLabel | DropDown_OnGetLabel - Gets the label to display next to the drop-down. This callback cannot be placed in the ThisWorkbook code module, it must be placed in a regular Code Module. This cannot be used if you have hard coded a Label attribute because getLabel and Label are mutually exclusive. |
| getScreentip | DropDown_OnGetScreentip - Returns the screentip to display with the drop-down. |
| getSelectedItemID | DropDown_OnGetSelectedItemId - Returns the ID of the item that you want selected by default. This is mutually exclusive with the getSelectedItemIndex callback. |
| getSelectedItemIndex | DropDown_OnGetSelectedItemIndex - Returns the Index of the item that you want selected by default. This is mutually exclusive with the getSelectedItemId callback. |
| getShowImage | DropDown_OnGetShowImage - Whether the image is displayed next to the drop-down. |
| getShowLabel | DropDown_OnGetShowLabel - Whether the label is displayed next to the drop-down. |
| getSupertip | DropDown_OnGetSupertip - Gets the supertip to display with the drop-down. |
| getVisible | DropDown_OnGetVisible - Whether the drop-down is visible or not. |
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext
