IWxStyle.PictureStretch

Syntax

PictureStretch: Boolean;

Description

The PictureStretch property enables the user to stretch an image to the size of a control when resizing an object.

Comments

If the property is set to True, an image is stretched, if it is set to False, it is not stretched. The property is set to False by default.

Example

Executing the example requires that repository contains a workspace with the IWSTYLE identifier containing shape. It is also required to have the ConnectedCPs.gif image.

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

Sub UserProc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Shape: IWxShape;
    style: IWxStyle;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
    Shape := ws.Shapes.Item(0);
    Shape.Picture := GxImage.FromFile("C:\ConnectedCPs.gif");
    Style := Shape.Style;
    Style.PictureStretch := True;
    (ws As IMetabaseObject).Save;
End Sub UserProc;

After executing the example an image, which will be stretched if the shape is resized, is used as a shape fill.

See also:

IWxStyle