Group2D.Item

From Xojo Documentation

Property (As Object2D )
aGroup2D.Item(Index as Integer) = newObject2DValue
or
Object2DValue = aGroup2D.Item(Index as Integer)

Supported for all project types and targets.

Returns the Object2D object specified by Index.

Example

This example gets the first object in the Group2D.

Dim px As PixmapShape
Dim s As StringShape
Dim d As New Group2D
Dim o As New Object2D

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)

g.DrawObject(d, 100, 100)

o = d.Item(0)