I've some texBox
where the users has to input some data.
textBox1
textBox2
textBox3
textBox4
After filling those textBox
, the users presses on a button and other stuff is done.
I want to clear all the textBox
as soon as the users clicks on the button.
I know I can do it by one by one using .clear
textBox1.clear();
textBox2.clear();
textBox3.clear();
textBox4.clear();
But this looks a bit dirty for me as I have more than 4 textBoxes.
So I was thinking about looping from 1 to number_of_textboxes
and then .clean
each one, but I dont know how can I get the number_of_texboxes
. Is there a way to get it so I can make this loop, or any other easy way to achieve this?
Thanks in advance.