IGxRect.IsEmpty

Syntax

IsEmpty: Boolean;

Description

The IsEmpty property returns True if all margins of the integer rectangle are null.

Example

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

Var

Obj: ITabObject;

Rect: IGxRect;

s: String;

Begin

Rect:=New GxRect.Create(0,0,1,1);

Obj:=UiTabSheet1.TabSheet.Objects.Add("PrxPicture", Rect.ToRectF);

(Obj As IPrxPicture).Image:=GxImage.FromFile("c:\1.bmp");

Rect.Width:=Math.RandBetweenI(0,15);

Rect.Height:=Math.RandBetweenI(0,15);

Obj.Rectangle:=Rect.ToRectF;

If Rect.IsEmpty Then

s:="Yes";

Else

s:="No";

End If;

End Sub Button1OnClick;

After executing the example clicking the button creates an image in the regular report. The image source is the 1.bmp file. The "s" variable contains Yes if margins of the rectangle bounding the image are null.

See also:

IGxRect