ImageIndex: IStandardDimAttribute;
The ImageIndex property determines table dictionary attribute whose function is Element Icon.
This property is relevant if the repository is linked to a document containing dictionary element icons. If this attribute is set, an image is displayed next to element names. Image index matches the value of this attribute.
Only an integer dictionary attribute can be used as value of this property.
Executing the example requires a table dictionary with the TAB_DIM identifier.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Dimens: IStandardDimension;
DimAttrs: IStandardDimAttributes;
DimAttribut: IStandardDimAttribute;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("TAB_DIM").Edit;
Dimens := MObj As IStandardDimension;
DimAttrs := Dimens.Attributes;
DimAttribut := DimAttrs.Add;
DimAttribut.DataType := DbDataType.Integer;
DimAttribut.Id := "ImagesAttr";
DimAttribut.Name := Attribute for pictograms;
DimAttrs.ImageIndex := DimAttribut;
MObj.Save;
End Sub Main;
After executing the example the dictionary contains a new attribute functioning as Element Icon.
See also: