user607631
user607631

Reputation: 1

run time text boxs

hey all... its very hard to explan i hope you understand it and help coz i really need your help guys the thing is i have to make the user choose the number of matrix with this number i have to create the same number of matrices again and do calculation on each one like if user matrix 3x3 i have to redo this matrix with different value 3 times my question is : 1- how can i re do the same number of textboxs over and over . 2- how i can calculate each matrix and get the value i hope you understand

Upvotes: 0

Views: 82

Answers (1)

Hans Olsson
Hans Olsson

Reputation: 55009

To create a TextBox dynamically, just new up a new instance of a TextBox, set the properties to decide where it should be shown, and add it to the Controls collection of the container where you want to place it.

As well as adding them to the Controls collection, you could also add the reference to your own collection, which could be, for example a list of lists. That way, when you need to do the calculation you'd just loop through that collection and get the values from each TextBox.

Upvotes: 1

Related Questions