Resources: IResourceObject;
The Resources property determines the Resources repository object, which images are used in ribbon controls.
When setting up the ribbon, any images can be connected with the particular controls. Different tags correspond to these images in the XML string structure:
<IMAGE>
<IMAGE_SCENIC>
<IMAGE_SMALL>
<IMAGE_LARGE>
//...
<ELEMENT>
<ELEMENT_NAME>Button_Palette</ELEMENT_NAME>
<ID>
<NAME>IDC_BUTTON1069</NAME>
<VALUE>1069</VALUE>
</ID>
<INDEX_SMALL>0</INDEX_SMALL>
<DEFAULT_COMMAND>FALSE</DEFAULT_COMMAND>
<ICONS_IN_ROW>0</ICONS_IN_ROW>
<SIZE_ICON>16, 16</SIZE_ICON>
<IMAGE>
<NAME>IDR_BCGP_IMAGE_PALETTE_0</NAME>
</IMAGE>
</ELEMENT>
//...
<CATEGORY>
<ELEMENT_NAME>Category</ELEMENT_NAME>
<NAME>Main</NAME>
<IMAGE_SMALL>
<NAME>IDR_BCGP_IMAGE_CATEGORY_SMALL_0</NAME>
</IMAGE_SMALL>
<IMAGE_LARGE>
<NAME>IDR_BCGP_IMAGE_CATEGORY_LARGE_0</NAME>
</IMAGE_LARGE>
//...
</CATEGORY>
To make the images available when using the Ribbon component on user forms, execute the following operations:
Create the Resources object in the repository and specify it as a value of this property.
Create in the resource an image, which identifier matches with the <Name> element of the <Image*> tag from the XML string of the ribbon.
When the XML string of the ribbon is loaded, the search is executed and found images are displayed for the corresponding controls.
The property use is given in the example for the LoadFromXML method.
See also: