IWxStyle.PictureMarginLeft

Syntax

PictureMarginLeft: Double;

Description

The PictureMarginLeft property determines image margin from the left edge of a control.

Example

Executing the example requires that the repository contains 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.PictureMarginLeft := 5;
    (ws As IMetabaseObject).Save;
End Sub UserProc;

After executing the example an image margin is set from the left edge of an object.

See also:

IWxStyle