IStyleContainer.Key

Syntax

Key: Integer;

Description

The Key property returns the key of the style container.

Example

Sub Main;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    StyleSheet: IStyleSheet;
    Style: IStyleContainer;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById(
"Global_Style").Edit;
    StyleSheet := MObj 
As IStyleSheet;
    Style := StyleSheet.Add;
    i := Style.Key;
    MObj.Save;
End Sub Main;

After executing the example a new style container is added, and the "i" variable contains its key.

See also:

IStyleContainer