Grid of containers

Hi,

I want to draw a grid with a container,


For i as integer = 0 to 50

		Dim c As New SimpleContainer
		
	      c.EmbedWithin(Self, 10, 10, c.Width, c.Height)
		
Next

How can I distribute the container in rows and columns of 3?
Greetings.

[code]dim x, y, xDelta, yDelta As integer
x = 10
y = 10
xDelta = myHorzOffset
yDelta = myVertOffset

For i as integer = 0 to 50

	Dim c As New SimpleContainer
	
      c.EmbedWithin(Self, x, y, c.Width, c.Height)

x = x + xDelta
if x = ?? Then
y = y + yDelta
x = 10
end if

Next[/code]

You could also choose to use a constant instead of the xDelta and yDelta

I get it, thanks a lot.

you put the literal value in where I have ??
You have to do some calculation on your own. I just gave you an outline.