IGxRectangleTransformImage.Margins

Syntax

Margins: IGxMargins;

Description

The Margins property determines parameters of fixed margins of graphics.

Example

Executing the example requires a form with the ImageButton component named ImageButton1.

Sub ImageButton1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Img: IGxImage;

TransfImage: IGxRectangleTransformImage;

Marg: IGxMargins;

Begin

Img := GxRectangleTransformImage.FromFile("c:\Image.bmp");

TransfImage := Img As IGxRectangleTransformImage;

Marg := TransfImage.Margins;

Marg.Bottom := 5;

Marg.Left := 5;

Marg.Right := 5;

Marg.Top := 5;

TransfImage.Unit := GxUnit.Millimeter;

ImageButton1.NormalLook.Background := TransfImage;

End Sub ImageButton1OnClick;

After executing the example clicking the ImageButton1 button changes the button's background. The Image.bmp image is specified as a background in the regular mode of the button. The fixed area 5 mm from all the edges is set for the image.

See also:

IGxRectangleTransformImage