Group2D.Item

From Xojo Documentation

Method

Group2D.Item(Index as Integer) As Object2D

Supported for all project types and targets.

Returns the Object2D object specified by Index.

Sample Code

This code 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)