martin.s.ransome
Active member
- Joined
- May 29, 2011
- Messages
- 25
- Programming Experience
- 5-10
I want to create two columns of checkboxes but only the first column is being displayed. Please look at me code and advise where I have erred in my ways and thanks for any assistance rendered:
VB.NET:
Sub addCheckBoxes()
Dim chBox1 As New CheckBox
Dim chBox2 As New CheckBox
Static x, i As Int32
Dim intTop1 As Int32 = (x * 24) + 110
Dim intLeft1 As Int32 = 400
Dim intTop2 As Int32 = (x * 24) + 110
Dim intLeft2 As Int32 = 480
chBox1.Location = New Point(intLeft1, intTop1)
chBox1.Name = "chkBox_" + i.ToString
chBox1.Visible = True
chBox2.Location = New Point(intLeft2, intTop2)
i = i + 1
chBox2.Name = "chkBox_" + (i).ToString
chBox2.Visible = True
Me.Controls.Add(chBox1)
Me.Controls.Add(chBox2)
x = x + 1
i = i + 1
End Sub