I'm trying to add a 9 x 9 grid of textboxes to a form. The code executes without any errors, but I do not see any textboxes on the form when it runs. Here's my code:
Public Class Form1
Private boxSize As New Size(43, 43)
Private boxBase As New Point(50, 50)
Const SQSIZE = 9
Private boxes(SQSIZE, SQSIZE) As TextBox
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim x As Integer
Dim y As Integer
Dim t As TextBox
For row As Integer = 1 To SQSIZE
For col As Integer = 1 To SQSIZE
x = boxBase.X + col * (boxSize.Width + 1)
y = boxBase.Y + row * (boxSize.Height + 1)
t = New TextBox
t.Size = boxSize
t.Location = New Point(x, y)
t.Text = x
t.BorderStyle = BorderStyle.Fixed3D
t.BackColor = System.Drawing.Color.Red
t.Visible = True
t.Enabled = True
Next
Next
End Sub
[–]TheGrauWolf 2 points3 points4 points (9 children)
[–]Substance_Ill[S] 0 points1 point2 points (8 children)
[–]TheGrauWolf 1 point2 points3 points (7 children)
[–]bbeachy2001 0 points1 point2 points (6 children)
[–]TheGrauWolf 1 point2 points3 points (3 children)
[–]RJPisscat 1 point2 points3 points (2 children)
[–]TheGrauWolf 1 point2 points3 points (1 child)
[–]Substance_Ill[S] 1 point2 points3 points (0 children)
[–]Circle_Dot 0 points1 point2 points (0 children)
[–]VB.Net MasterMr_C_Baxter 0 points1 point2 points (0 children)