I have a dynamically created tabpage for windows forms. the tabpage is split into two horizontal panels. The top panel should be able to hold up to 4 textboxes like this
TextBox1
TextBox2
TextBox3
TextBox4
There WILL be atleast one TextBox. Maximum is 4. How do I create a TabPage with two panels where the top panel only takes up the real estate as needed(i.e only use up the real estate for one textbox or 2 textboxes, or 3 textboxes or the maximum 4 textboxes) and the rest of the tabpage is available for Panel2.