Hello,
I wrote the following code to create dynamic controls-textboxes and labels.
ctlRow += 1
ctlRowLocation += 25
Dim new_ForceLabel As New Label
new_ForceLabel.Text = "Force" + Convert.ToString(ctlRow - 1)
new_ForceLabel.Location = New Point(txtForceLabel.Location.X + 2, ctlRowLocation)
new_ForceLabel.Height = 25
new_ForceLabel.Width = 50
Dim new_ForceInput As New TextBox
new_ForceInput.Name = "Force" + Convert.ToString(ctlRow - 1)
new_ForceInput.Location = New Point(txtForce.Location.X + 2, ctlRowLocation)
new_ForceInput.Height = 25
new_ForceInput.Width = 75
Dim new_DirectionLabel As New Label
new_DirectionLabel.Text = "Direction" + Convert.ToString(ctlRow - 1)
new_DirectionLabel.Location = New Point(txtDirectionLabel.Location.X + 2, ctlRowLocation)
new_DirectionLabel.Height = 25
new_DirectionLabel.Width = 75
Dim new_DirectionInput As New TextBox
new_DirectionInput.Name = "Direction" + Convert.ToString(ctlRow - 1)
new_DirectionInput.Location = New Point(txtDirection.Location.X + 2, ctlRowLocation)
new_DirectionInput.Height = 25
new_DirectionInput.Width = 75
Me.GroupBox1.Controls.Add(new_ForceLabel)
Me.GroupBox1.Controls.Add(new_ForceInput)
Me.GroupBox2.Controls.Add(new_DirectionLabel)
Me.GroupBox2.Controls.Add(new_DirectionInput)
GroupBox1.Height = ((ctlRow * 25) + 5)
GroupBox2.Height = ((ctlRow * 25) + 5)
How can I access the data entered into these textboxes. Please help. I can't seem to figure out a way to do so.
Thanks in advance.