弄一个 TabControl3,把然后把各个tabcontrol一个page一个放进去,然后用代码,类似
Dim pidx As object
Dim tname As String
Dim idx As Integer
If e.Sender.Name.StartsWith("btn_tabcontrol") Then
pidx = vars("p1_pidx")
tname = e.Sender.Name.split("_")(1)
idx = e.Sender.Name.split("_")(2).replace("pg", "")
End If
If pidx IsNot Nothing Then
For Each k As String In pidx.keys '显示所有值
Dim btn As WinForm.Button = e.Form.Controls(pidx(k))
If pidx(k) = e.Sender.Name
Dim tab As WinForm.TabControl = e.Form.Controls(tname)
tab.SelectedIndex = idx
e.Form.Controls("TabControl3").SelectedIndex = tname.Replace("tabcontrol", "") - 1
btn.BackColor = Color.red
Else
btn.BackColor = Color.white
End If
Next
End If