IWxShape.SelectionStyle

Syntax

SelectionStyle: IWxStyle;

Description

The SelectionStyle property determines parameters for formatting the selected shape text fragment.

Comments

Style of the selected text fragment may differ from the entire text style, particularly, on editing the formatted shape text in the RTF format.

To determine shape formatting parameters, use IWxShape.Style.

Example

Executing the example requires that repository contains a workspace with the WSP identifier containing shape.

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    WSP: IWxWorkspace;
    Shape: IWxShape;
    SelStyle: IWxStyle;
    s: Array[5Of double;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get workspace
    WSP := MB.ItemById("WSP").Edit As IWxWorkspace;
    // Get shape
    Shape := WSP.Shapes.Item(0);
    // Set shape text
    Shape.Text := "text";
    // Get formatting parameters of the selected shape text fragment
    SelStyle := Shape.SelectionStyle;
    // Change font size
    SelStyle.TextFontSize := 24;
    // Save changes
    (Wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example font size of the specified shape text is changed.

See also:

IWxShape