For ribbon controls
Applies to
RibbonTabButtonItem, RibbonPanelItem, RibbonLargeButtonItem,
RibbonSmallButtonItem, RibbonComboBoxItem, RibbonMenuItem
controls
Description
The PictureName property specifies the name of the file that
contains the picture displayed in the control. The picture will be
displayed in 16*16 pixels for RibbonTabButtonItem, RibbonPanelItem,
RibbonSmallButtonItem, and RibbonComboBoxItem, in 32*32 pixels for
RibbonLargeButtonItem, and in 16*16 for RibbonMenuItem in RibbonMenu or
32*32 pixels for RibbonMenuItem in RibbonApplicationMenu.
The picture for RibbonPanelItem will be shown when the panel is
collapsed (a panel is collapsed automatically when the window width
becomes too small to display the panel). See the section called “Introduction to RibbonBar items” in Users Guide for more.
The picture for RibbonMenuItem will not be shown when the menu is
displayed in the recent item list.
The picture is recommended to be the following formats:
-
Bitmaps (.BMP)
-
Portable Networks Graphics (.PNG)
Usage
In the RibbonBar Builder
To insert the picture name in the XML editor of the RibbonBar
Builder:
-
Place the cursor in the empty string of the PictureName element in the XML editor, or
double click to select the value of the PictureName element, and then click the
Select Image button from the
toolbar of the RibbonBar Builder. -
In the Select Image dialog,
select to use a custom image or a built-in image, and then click
OK.The selected image name will be inserted into the value of the
PictureName element.
In scripts
The PictureName property takes a string value.
The following line selects the picture file for two tab
buttons:
|
1 2 3 4 |
RibbonTabButtonItem lr_TabButton, lr_TabButton2 lr_TabButton.PictureName = "AddSmall!" lr_TabButton2.PictureName = "pngadd.png" |