curtop = 0
Dim front As Boolean = True
Dim mult, offset As Double
viewno = numshelves
For i = 1 To numshelves
curleft = 10dip
For j = 1 To numpositions
Dim bottle As Button
bottle.Initialize("bottle")
bottle.Background = empty
bottle.Tag = i & ":0:" & j & ":" & viewno & ":empty"
If front Then
mult = 1 : offset = 0
front = False
Else
mult = .6 : offset = bottlewidth*.2
front = True
End If
pnlFridge.AddView(bottle, curleft, curtop + offset, bottlewidth*mult, bottlewidth*mult)
curleft = curleft + bottlewidth + bottlegap
viewno = viewno + 1
Next
curleft = 10dip
curtop = curtop + shelfheight + shelfgap
Next