gallery

In the object model this is RibbonGallery.
Lets you add multiple items to a single button
Galleries can be dynamic.
A drop-down control that drops to show a grid of other controls.
The gallery can contain many different types of controls and is extremely flexible.
Presents an array of grid of visual elements
There is also a region at the bottom for additional buttons
There is an ItemsLoading event that is raised before the control is displayed.
There is a ButtonClick event when one of the buttons is clicked
There is a Click event when an item in the gallery is clicked
Use the columnCount & rowCount to specify the number of rows and columns that will display the items and buttons of the gallery.
The top of the control displays the items in the grid.
The dropdown gallery can highlight a selected item permanently or you can turn off the highlighting of a selected item
The items in a gallery can be specified at design time or changed dynamically at runtime
The buttons in a gallery cannot be changed at runtime but you can show and hide them to create a dynamic list


<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> 
  <ribbon startFromScratch="true">
    <tabs>
      <tab id="CustomTab" label="My Tab">
        <group id="Group1" label="MyGroup">
          <gallery id="MyGallery"
                   imageMso = "DateAndTimeInsert"
                   label="Select Month"
                   columns="3"
                   rows="4"
                   onAction="Gallery_OnAction">
            <item id="Month1" label="January"/>
            <item id="Month2" label="February"/>
            <item id="Month3" label="March"/>
            <item id="Month4" label="April"/>
            <item id="Month5" label="May"/>
            <item id="Month6" label="June"/>
            <item id="Month7" label="July"/>
            <item id="Month8" label="August"/>
            <item id="Month9" label="September"/>
            <item id="Month10" label="October"/>
            <item id="Month11" label="November"/>
            <item id="Month12" label="December"/>
            <button id="InsertMonthButton"
                    label="Insert The Month"
                    onAction="InsertTheMonth"/>
          </gallery>
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

Attributes (Properties)

columns(ColumnCount) 
description(Description) displayed when the size is set to 'large' 
enabled(Enabled) "true" | "false" 
id(Id) 
idMso(OfficeImageId) 
idQ  
image(Image) 
imageMso  
insertAfterMso  
insertAfterQ  
insertBeforeMso  
insertBeforeQ  
itemHeightThe height of an individual item 
itemWidthThe width of an individual item 
keytip(KeyTip) 
label(Label) 
rows(RowCount) 
screentip(ScreenTip) 
showImage(ShowImage) "true" | "false" 
showItemImage(ShowItemImage) "true" | "false" 
showItemLabel(ShowItemLabel) "true" | "false" 
showLabel(ShowLabel) "true" | "false" 
size(ControlSize) 
sizeString"xxxxxx" ?? 
supertip(SuperTip) 
tag(Tag) 
visible(Visible) "true" | "false" 
 (Buttons) 
 (GenerateMember) 
 (Items) 
 (Modifiers) 
 (Position) 
 (Locked) 
 (ShowItemSelection) gets or sets the highlighted selected item 
 (ImageName) 

Children

button  
item  

Callbacks (run-time)

onActionGallery_OnAction -  
getDescriptionGallery_OnGetDescription -  
getEnabledGallery_OnGetEnabled -  
getImageGallery_OnGetImage -  
getImageMsoGallery_OnGetImageMso -  
getItemCountGallery_OnGetItemCount -  
getItemHeightGallery_OnGetItemHeight -  
getItemIDGallery_OnGetItemID -  
getItemImageGallery_OnGetItemImage -  
getItemLabelGallery_OnGetLabel -  
getItemScreentipGallery_OnGetItemScreenTip -  
getItemSupertipGallery_OnGetItemSuperTip -  
getItemWidthGallery_OnGetItemWidth -  
getKeytipGallery_OnGetKeyTip -  
getLabelGallery_OnGetLabel -  
getScreentipGallery_OnGetScreenTip -  
getSelectedItemIDGallery_OnGetSelectedItemID -  
getSelectedItemIndexGallery_OnGetSelectedItemIndex -  
getShowImageGallery_OnGetShowImage -  
getShowLabelGallery_OnGetShowLabel -  
getSizeGallery_OnGetSize -  
getSupertipGallery_OnGetSuperTip -  
getVisibleGallery_OnGetVisible -  

Public Sub Gallery_OnAction( _ 
   ByRef control As Office.IRibbonControl, _
   ByRef galleryID As String, _
   ByRef selectedIndex As Integer)
End Sub

' C# Equivalent
string Gallery_OnAction(
   Office.IRibbonControl control,
{
}


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