S
Steve
I'm using "Dim btn As New ButtonArray(Me)" to create a series of
buttons on my form. However, I'd prefer it if they were created on a
tab page of a tab control. Is this possible?
My code:
Dim X As Integer = 10
Dim Y As Integer = 10
Dim bttnCount As Integer = 1
TabPage2.Focus()
Dim btn As New ButtonArray(Me)
Dim iTest As Integer
For iTest = 0 To objDataView.Count - 1
btn.Add(objDataView(iTest)("ExtraType"))
btn(iTest).Size = New System.Drawing.Size(96, 56)
btn(iTest).BackColor = Color.White
btn(iTest).Name = "Button" & iTest
btn(iTest).Location = New Point(X, Y)
AddHandler btn(iTest).Click, AddressOf btn_Click
bttnCount = bttnCount + 1
X = X + 96
If bttnCount > 8 Then
Y = Y + 56
X = 10
bttnCount = 1
End If
Next
buttons on my form. However, I'd prefer it if they were created on a
tab page of a tab control. Is this possible?
My code:
Dim X As Integer = 10
Dim Y As Integer = 10
Dim bttnCount As Integer = 1
TabPage2.Focus()
Dim btn As New ButtonArray(Me)
Dim iTest As Integer
For iTest = 0 To objDataView.Count - 1
btn.Add(objDataView(iTest)("ExtraType"))
btn(iTest).Size = New System.Drawing.Size(96, 56)
btn(iTest).BackColor = Color.White
btn(iTest).Name = "Button" & iTest
btn(iTest).Location = New Point(X, Y)
AddHandler btn(iTest).Click, AddressOf btn_Click
bttnCount = bttnCount + 1
X = X + 96
If bttnCount > 8 Then
Y = Y + 56
X = 10
bttnCount = 1
End If
Next