IDataAreaOwner.OwnerStyleSheet

Fore Syntax

OwnerStyleSheet: IStyleSheet;

Fore.NET Syntax

OwnerStyleSheet: Prognoz.Platform.Interop.Drawing.StyleSheetClass;

Description

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

Comments

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

Fore 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.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Report: IDataAreaOwner;
    Style: StyleSheetClass;
Begin
    mb := Params.Metabase;
    Report := mb.ItemById["WORKBOOK_STYLE"].Edit() As IDataAreaOwner;
    Style := mb.ItemById["STYLE_TB"].Bind() As StyleSheetClass;
    Report.OwnerStyleSheet := Style;
    (Report As IMetabaseObject).Save();
End Sub;

See also:

IDataAreaOwner