Est-il possible d'indexer des TextBox.text ?
Bonsoir,
Si je pouvais en VB.net indexer TextBox je pourrais écrire une boucle test comme en VB6:
Code:
1 2 3
| For n=1 to 50
Lecture(n) = textboxCiteres(n).text
next n |
Malheureusement je ne trouve pas de solution pour éviter d'attribuer à chaque saisine de textbox un 'change' comme :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Private Sub TextBox11_TextChanged(sender As Object, e As EventArgs) Handles TextBox11.TextChanged
Call LectureCitères()
End Sub
Private Sub TextBox12_TextChanged(sender As Object, e As EventArgs) Handles TextBox12.TextChanged
Call LectureCitères()
End Sub
Private Sub TextBox13_TextChanged(sender As Object, e As EventArgs) Handles TextBox13.TextChanged
Call LectureCitères()
End Sub
'etc. |
C'est long et fastidieux.
Peut-on utiliser la propriété TAG de chaque textbox ?
Si vous avez une idée ?
En vous remerciant.