R
Rick
I have a form that needs to display values from an array on the form; how do
I achieve the following?
If item count in array is < 20 then print
Val1 Val2
Val3 Val4
Val5 Val6
and so on
If items in array is > 20 then print
Val1 Val2 Val3
Val4 Val5 Val6
Val7 Val8 Val9
and so on
The following code works fine and prints values in two columns butI need to
modified it to print in three columns if nItemsCount > 20
for i=1 to nItemsCount
If i Mod 2 Then
nX = nX * 25
nY = nY - 15
End If
myVal.Name = "myVal" & i
myVal.Text = sLabel
myVal.Location = New Point(nX, nY + 15)
Controls.Add(myTextBoxLabel)
Next
I achieve the following?
If item count in array is < 20 then print
Val1 Val2
Val3 Val4
Val5 Val6
and so on
If items in array is > 20 then print
Val1 Val2 Val3
Val4 Val5 Val6
Val7 Val8 Val9
and so on
The following code works fine and prints values in two columns butI need to
modified it to print in three columns if nItemsCount > 20
for i=1 to nItemsCount
If i Mod 2 Then
nX = nX * 25
nY = nY - 15
End If
myVal.Name = "myVal" & i
myVal.Text = sLabel
myVal.Location = New Point(nX, nY + 15)
Controls.Add(myTextBoxLabel)
Next