IGxSizeF.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 real values, has a null width and height.

Example

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

Var

SizeF: IGxSizeF;

Rect: IWxRectangle;

b: Boolean;

s: String;

Begin

SizeF:=New GxSizeF.Create(0.5,0.36);

Rect:=UiWorkspace1.WxWorkspace.CreateRectangle;

SizeF.Width:=Math.RandBetween(0.65,50.55);

SizeF.Height:=Math.RandBetween(0.33,50.7);

Rect.BeginUpdate;

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

Rect.EndUpdate;

b:=SizeF.IsEmpty;

If b 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:

IGxSizeF