IDataAreaOwner.OwnerStyleSheet

Syntax

OwnerStyleSheet: IStyleSheet;

Description

The OwnerStyleSheet property determines external styles table used by the object.

Comments

To work with internal styles table, use the IDataAreaOwner.OwnerInnerStyleSheet property.

Example

Executing the example requires that repository contains workbook with the WORKBOOK_STYLE identifier and styles table with the STYLE_TB identifier.

Add links to the Drawing, Express, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Report: IDataAreaOwner;
    Style: IStyleSheet;
    StyleCont: IStyleContainer;
    StEntity: IStyledEntity;
Begin
    mb := MetabaseClass.Active;
    Report := mb.ItemById("WORKBOOK_STYLE").Edit As IDataAreaOwner;
    Style := mb.ItemById("STYLE_TB").Bind As IStyleSheet;
    Report.OwnerStyleSheet := Style;
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the STYLE_TB external styles table is connected to the WORKBOOK_STYLE workbook.

See also:

IDataAreaOwner