0

I'm new to Visual Basic.
I have a little program look like this.
https://www.dropbox.com/s/xr44pxp3n79atkk/wall.png <Please have a look

It will calculate the total area by adding up all wall area.

 Public Sub btnWallAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWallAdd.Click
        FlowLayoutPanel1.Controls.Clear()
        FlowLayoutPanel1.AutoScroll = True

        For i As Integer = 1 To Val(txtWallNo.Text)
            Dim Width As New TextBox()
            Dim Height As New TextBox()

            Width.Name = "Width" & i
            Width.Text = Width.Name
            Height.Name = "Height" & i
            Height.Text = Height.Name

            FlowLayoutPanel1.Controls.Add(Width)
            FlowLayoutPanel1.Controls.Add(Height)

        Next
    End Sub

I have successfully create dynamic textbox base on the number entered by user but I don't know how to get values from those textbox an add them up. Please teach me how do it. Thank you very much!
Sorry for my English!

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by Mike Askew
0

Been a long time since I touched VB.Net,

A quick google showed the following as a way to do it, however I have not confirmed this myself.

TabPage.Controls.Find("ControlName", true)

Where the true options also searches child controls.

Edited by Mike Askew

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.