Group2D.Count

From Xojo Documentation

Property (As Integer )
aGroup2D.Count = newIntegerValue
or
IntegerValue = aGroup2D.Count

Supported for all project types and targets.

The number of Object2D objects the group contains.

Example

This example reports that there are two objects in the Group2D.

Dim px As PixmapShape
Dim s As StringShape
Dim d As New Group2D
Dim i As Integer

px = New PixmapShape(DSC_0343)
d.Append(px)

s = New StringShape
s.Y = 70
s.Text = "This is what I call a REAL car!"
s.TextFont = "Helvetica"
s.Bold = True
d.Append(s)
i = d.Count
TextField1.Text = Str(i)
g.DrawObject(d, 100, 100)