I have an array which holds survey results. I am wanting to put the survey results onto a windows form and place the question in a label and the corresponding answer in a text box. I am housing my questions in a List<string> array and my answers in a List<string> array as well. I have created a tablelayoutpanel on my form and I want to be able to iterate my array and create a label with the question and a text box with the answer beside it. I can't seem to get the formatting set-up properly. This is what I was using.
TextBox tbox = new TextBox(); Label labell = new Label(); labell.Name = "label"; labell.Text = "Test"; tableLayoutPanelAttempt1.Controls.Add(labell,0,1); tbox.Name = "TextBox"; tbox.Text = "TextBox"; tableLayoutPanelAttemp1.Controls.Add(tbox,0,1);