Using the same components and controls in multiple tabs?

  • Thread starter Thread starter Kenton Smith
  • Start date Start date
K

Kenton Smith

How can I use the same controls and components in more then 1 tab
collection?

The tab control covers the entire window. The different tabs are going to
contain some unique components and some common components. I do not want to
have repeat the common parts.

Thanks
 
Or just reparent the controls on SelectedIndexChanged().

\\\
Private CommonControls() As Control

Private Sub Form_Load(...)...
CommonControls = New Control(){Button1, TextBox1, CheckBox1}
End Sub

Private Sub TabControlX_SelectedIndexChanged(...)...
If CommonControls Is Nothing Then Return
TabControlX.SelectedTab.Controls.AddRange(CommonControls)
End Sub
///
 
Back
Top