I'v created a usercontrol called Cell. I'v also created a usercontrol called Row.
A Row can contain one or more Cells, aligned across the row one right after each
other. A Grid would therefore contain one or more Row controls.
I'm having a problem positioning the cells. This code
should work, but
the last cell is off by the width of itself.
Hope that was clear. Heres the code:
Private Function GetNextCellLeftPosition() As Integer
Dim iCell As Integer
Dim iRetVal As Integer
iRetVal = 0
For iCell = 0 To RowCells.Count - 1
If iCell = 0 Then
iRetVal = 0
Else
iRetVal = iRetVal + RowCells(iCell - 1).Left + RowCells(iCell - 1).Width
End If
Next
GetNextCellLeftPosition = iRetVal
End Function
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people