IStyleSheet.Item

Syntax

Item(Index: Integer): IStyleContainer;

Parameters

Index - index of the style container in the styles table.

Description

The Item property returns the style container from the styles table, which index is passed by the Index parameter.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

StyleSheet: IStyleSheet;

Style: IStyleContainer;

TabSty: ITabCellStyle;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("Global_Style").Edit;

StyleSheet := MObj As IStyleSheet;

Style := StyleSheet.Item(StyleSheet.Count - 1);

TabSty := New TabCellStyle.Create;

TabSty.LoadFromContainer(Style);

TabSty.Font.Size := TabSty.Font.Size * 2;

TabSty.SaveToContainer(Style);

MObj.Save;

End Sub Main;

After executing the example the font size is increased two times for the style stored in the last container of the styles table.

See also:

IStyleSheet