Dim width As Int = (PAN1.width / 3)
Dim height As Int = (PAN1.height / 3)
Dim a As Int
Dim r As Int = 0
Dim c As Int = 0
For a=0 To MaxPics - 1
If IV(a).IsInitialized = False Then
' if the object is NOT intalized, we also need to add it to the view
IV(a).Initialize("")
PAN1.AddView(IV(a),0,0,0,0) ' no values here, as we need to scale the object first
Scale.ScaleViewDS(IV(a))
End If
IV(a).Top = r * (height)
IV(a).Left = c * (width)
IV(a).width = width
IV(a).height = height
If CB(a).IsInitialized = False Then
' if the object is NOT intalized, we also need to add it to the view
CB(a).Initialize("")
PAN1.AddView(CB(a),0,0,0,0) ' no values here, as we need to scale the object first
Scale.ScaleViewDS(CB(a))
End If
CB(a).Top = r * (height)
CB(a).Left = c * (width)
CB(a).width = width
CB(a).height = height
c = c + 1
If c = 3 Then
c = 0
r = r + 1
End If
Next