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 
ItemsLoadingThe ItemsLoading event is raised before the dropdown is displayed
SelectionChangedOnAction 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)

onActionDropDown_OnAction - Fired when you choose an item in the drop-down.
This is the run-time equivalent to the design-time SelectedChanged event
getEnabledDropDown_OnGetEnabled - Whether the drop-down is enabled or not.
getImageDropDown_OnGetImage - Gets the image associated with the drop-down.
getItemCountDropDown_OnGetItemCount - Gets the total number of items to display in the drop-down.
getItemIDDropDown_OnGetItemID - Gets the ID for a particular item.
(The "Generate Callbacks" inside the Custom UI Editor does not generate this)
getItemImageDropDown_OnGetItemImage - Gets the image for a particular item.
getItemLabelDropDown_OnGetItemLabel - Gets the label for a particular item.
getItemScreentipDropDown_OnGetItemScreentip - Gets the screentip for a particular item.
(The "Generate Callbacks" inside the Custom UI Editor does not generate this)
getItemSupertipDropDown_OnGetItemSupertip - Gets the supertip for a particular item.
(The "Generate Callbacks" inside the Custom UI Editor does not generate this)
getKeytipDropDown_OnGetKeytip - Gets the keytip to display with the drop-down.
getLabelDropDown_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.
getScreentipDropDown_OnGetScreentip - Returns the screentip to display with the drop-down.
getSelectedItemIDDropDown_OnGetSelectedItemId - Returns the ID of the item that you want selected by default.
This is mutually exclusive with the getSelectedItemIndex callback.
getSelectedItemIndexDropDown_OnGetSelectedItemIndex - Returns the Index of the item that you want selected by default.
This is mutually exclusive with the getSelectedItemId callback.
getShowImageDropDown_OnGetShowImage - Whether the image is displayed next to the drop-down.
getShowLabelDropDown_OnGetShowLabel - Whether the label is displayed next to the drop-down.
getSupertipDropDown_OnGetSupertip - Gets the supertip to display with the drop-down.
getVisibleDropDown_OnGetVisible - Whether the drop-down is visible or not.



















© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext