GetObjectSmallImages(Var Imagelist: Object): Array;
ImageList. A link to the component, to which the changed 16x16 pixel icons will be loaded. Specify the ImageList or the GlobalImageList existing component as the value.
The GetObjectSmallImages method returns classes, for which the system icon was changed.
The result of working of the method is the array, each element of which contains the class of repository object, for which the system icon was changed. Also on executing the method in the variable which is passed as the input parameter ImageList, a new ImageList component will be created.
Indexes of the chart in the ImageList correspond to the indexes of the array elements.
System icons, same for the multiple objects (for example a standard cube and an ADOMD cube) separately are not replaced.
Icons are replaced for all applications (studio.exe, adm.exe and so on).
The specified icons can be transferred by the updating the repository together with theCustom Metadata special object.
To change icons for system object classes you can use the example given in the description of IMetabaseCustomExtender.SetObjectSmallImages.
To execute the example, create a form and place on it a button, and the ImageList and ImageBox components.
Add links to the Drawing and Metabase system assemblies.
The example is an event handler for the following button:
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
mb: IMetabase;
extender: IMetabaseCustomExtender;
arr: array Of variant;
imglist: object;
Begin
mb := MetabaseClass.Active;
extender := (mb.SpecialObject(MetabaseSpecialObject.CustomExtender)).Bind As IMetabaseCustomExtender;
arr := extender.GetObjectSmallImages(imglist);
ImageBox1.Image := (imglist As IImageList).Item(0);
End Sub Button1OnClick;
After executing the example the first changed icon will be output to the ImageBox component. The classes for which the icons were changed will be output to the console.
See also: