IsEmpty: Boolean;
The IsEmpty property returns True if all margins of the real rectangle are null.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Obj: ITabObject;
RectF: IGxRectF;
s: String;
Begin
RectF:=New GxRectF.Create(0,0,1,1);
Obj:=UiTabSheet1.TabSheet.Objects.Add("PrxPicture", RectF);
(Obj As IPrxPicture).Image:=GxImage.FromFile("c:\1.bmp");
RectF.Width:=Math.RandBetween(0,15.5);
RectF.Height:=Math.RandBetween(0,15.5);
Obj.Rectangle:=RectF;
If RectF.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 that bounds the image are null.
See also: