dejandejanovic
asked on
Replicate TabPage, and inside controls (labels, textboxes,etc) of TabControl?
Hi,
I would like to found proper way to replicate TabPage, and it's inside controls. By meaning proper way, as currently I have only in mind to write down long code behind, like:
TabControl1.TabPages.Add(T abPage2)
Dim NewLabel as new Label
NewLabel.Name = "LabelTest"
Dim NewTextBox as new TextBox
NewTextBox.Name = "TextBoxTest"
etc...
I have around 20-30 controls inside TabPage, and I would like to avoid writing long code.
Honestly, I really not sure if there is shortcut of replicating TabPage.
So, need help to understand this issue.
Thanks in advance for help to anyone.
I would like to found proper way to replicate TabPage, and it's inside controls. By meaning proper way, as currently I have only in mind to write down long code behind, like:
TabControl1.TabPages.Add(T
Dim NewLabel as new Label
NewLabel.Name = "LabelTest"
Dim NewTextBox as new TextBox
NewTextBox.Name = "TextBoxTest"
etc...
I have around 20-30 controls inside TabPage, and I would like to avoid writing long code.
Honestly, I really not sure if there is shortcut of replicating TabPage.
So, need help to understand this issue.
Thanks in advance for help to anyone.
I would create a user control with all the 20-30 controls on it. then when needed, only one control would need to be created to be added to a tabpage
ASKER
So, if I undestand correctly to create UserControl with necessary controls >> this UserControl could be used as template, and replicate as much as need it.
???
???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cool, and thanks for help/tips.