From Xojo Documentation


Group2D.Insert(Index as Integer, Object as Object2D)

Supported for all project types and targets.

Inserts the object passed to it at the specified location.

Sample Code

This example inserts a text string as the second object in the Group2D.

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

px = New PixmapShape(DSC_0343)

s = New StringShape
s.Y = 70
s.Text = "This is what I call a REAL car!"
s.TextFont = "Helvetica"
s.Bold = True

s2 = New StringShape

s2.Y = 20
s2.Text = "This is inserted text!"
s2.TextFont = "Helvetica"
s2.Bold = True
d.Insert(1, s2)

g.DrawObject(d, 100, 100)