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.

Var px As PixmapShape
Var t As TextShape
Var d As New Group2D
Var i As Integer

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

t = New TextShape
t.Y = 70
t.Value = "This is what I call a REAL car!"
t.FontName = "Helvetica"
t.Bold = True
d.Add(t)
i = d.Count
TextField1.Value = Str(i)
g.DrawObject(d, 100, 100)