IGxSize.IsEmpty

Syntax

IsEmpty: Boolean;

Description

The IsEmpty property determines whether width and height are null.

Comments

The IsEmpty property returns True if the size, determined with integer values, has a null width and height.

Example

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

Var

Size: IGxSize;

Rect: IWxRectangle;

s: String;

Begin

Size:=New GxSize.Create(0,0);

Rect:=UiWorkspace1.WxWorkspace.CreateRectangle;

Size.Width:=Math.RandBetweenI(0,50);

Size.Height:=Math.RandBetweenI(0,50);

Rect.BeginUpdate;

Rect.Size:= New GxSizeF.CreateFromSize(Size.ToSizeF);

Rect.EndUpdate;

If Size.IsEmpty Then

s:="Yes";

Else

s:="No";

End If;

End Sub Button1OnClick;

After executing the example clicking the button creates a rectangle in the workspace, and the "s" variable contains Yes if its width and height are equal.

See also:

IGxSize