S
stacy
I would like to create 4 tab pages in a tab control. 1 tab is for
properties, 1 is for status and 2 of the tabs will have the same
controls on them, for settings. The two settings tab pages will
contain identical Check boxes and Radio buttons within GroupBoxes. I
created the tab control with 3 tab pages using the toolbox (1 property
tab, 1 status tab and 1 settings tab). Then, at run time, I add the
forth tab page (if needed) and tried copying the controls from the
original tab page onto the new tab page:
For simplicity, I will only show the code for duplicating one control.
The control on the original settings page is gbRTO
Dim p2TabPg as New TabPage
Dim p2gb_RTO as New GroupBox
p2TabPg.Text = "Settings
ole2"
tabSensor.TabPages.Add(p2TabPg)
p2gb_RTO = gbRTO
tabSensor.TabPages(3).Controls.Add(p2gb_RTO)
When I run the code, the new control is placed on the new settings page
but the original control disappears from the original settings page.
Is there any way to do what I want without creating the forth tab
manually? If there isn't, is there a way to make the forth tab
invisible if it isn't needed?
Thanks,
Stacy
properties, 1 is for status and 2 of the tabs will have the same
controls on them, for settings. The two settings tab pages will
contain identical Check boxes and Radio buttons within GroupBoxes. I
created the tab control with 3 tab pages using the toolbox (1 property
tab, 1 status tab and 1 settings tab). Then, at run time, I add the
forth tab page (if needed) and tried copying the controls from the
original tab page onto the new tab page:
For simplicity, I will only show the code for duplicating one control.
The control on the original settings page is gbRTO
Dim p2TabPg as New TabPage
Dim p2gb_RTO as New GroupBox
p2TabPg.Text = "Settings

tabSensor.TabPages.Add(p2TabPg)
p2gb_RTO = gbRTO
tabSensor.TabPages(3).Controls.Add(p2gb_RTO)
When I run the code, the new control is placed on the new settings page
but the original control disappears from the original settings page.
Is there any way to do what I want without creating the forth tab
manually? If there isn't, is there a way to make the forth tab
invisible if it isn't needed?
Thanks,
Stacy