SetObjectSmallImages(ImageList: Object; ARRAYID: Array);
ImageList. A link to the component, to which the 16x16 pixel icons to be changed will be loaded. Specify the ImageList or the GlobalImageList existing component as the value.
ARRAYID. The array of the classes for which the icons are replaced.
The SetObjectSmallImages method determines the copy of collection with 16x16 pixel images for the array with classes.
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 the Custom Metadata special object.
To execute an example, add links to the Metabase and Drawing system assemblies. Create a form and place a button and the ImageList with three images.
Sub SetSmallImages(imglist: IImageList);
Var
extender: IMetabaseCustomExtender;
mb: IMetabase;
arr: array Of variant;
Begin
mb := MetabaseClass.Active;
arr := New Variant[3];
arr[0] := MetabaseObjectClass.KE_CLASS_FOLDER;
arr[1] := MetabaseObjectClass.KE_CLASS_FORM;
arr[2] := MetabaseObjectClass.KE_CLASS_PROCEDURALREPORT;
extender := (mb.SpecialObject(MetabaseSpecialObject.CustomExtender)).Edit As IMetabaseCustomExtender;
extender.SetObjectSmallImages(imglist, arr);
(extender As IMetabaseObject).Save;
End Sub SetSmallImages;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
SetSmallImages(ImageList1);
End Sub Button1OnClick;
After executing the example from the specified ImageList the icons for classes specified in the archive will be set.
See also: