IWxStyle.Assign

Syntax

Assign(StyleFrom: IWxStyle);

Parameters

StyleFrom. Style to be inherited.

Description

The Assign method is used to inherit all properties of another style.

Example

Executing the example requires that the repository contains a workspace with the WSP identifier that contains two shapes.

Add links to the Andy and Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Wsp: IWxWorkspace;
    Shape, Shape1: IWxShape;
    FormStyle: IWxStyle;
Begin
    // Get workspace for editing
    Mb := MetabaseClass.Active;
    Wsp := Mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
    Wsp.BeginUpdate;
    Shape := Wsp.Shapes.Item(0);
    Shape1 := Wsp.Shapes.Item(1);
    FormStyle := Shape.Style;
    Shape1.Style.Assign(FormStyle);
    Wsp.EndUpdate;
    (Wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, the first object inherits the formatting of the second object.

See also:

IWxStyle