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.

Var px As PixmapShape
Var t As TextShape
Var d As New Group2D
Var o As New Object2D

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.TextFont = "Helvetica"
t.Bold = True
d.Add(t)

g.DrawObject(d, 100, 100)

o = d.Item(0)