move(automatically) to many textboxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jabbary
    New Member
    • Dec 2017
    • 1

    #1

    move(automatically) to many textboxes

    I have many textboxes in my form .
    I want to move(automatica lly) to each textbox to take the value of its text property and put them in a listBox.
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    Looping over the controls in a form:
    Code:
     foreach (Control control in this.Controls)
    {
    }
    In this loop you should only select textBoxes
    Code:
    if (item.GetType().Name == "TextBox")
    {
    }
    In this if-block you can add the values you like ...

    Comment

    Working...