Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabControl

Status
Not open for further replies.

WP

Programmer
Nov 30, 1999
463
CH
I have 7 tabs and currently have code that that removes 4 tabs conditionally.

If Not _server.User.ConfigAccess Then
mainTab.TabPages.Remove(exchangeTab)
mainTab.TabPages.Remove(tabBrokers)
mainTab.TabPages.Remove(routeTab)
mainTab.TabPages.Remove(queueTab)
mainTab.TabPages.Remove(configTab)
End If

On form open the 2nd tab has the focus if the tabs have been removed.

How can I set the first tab to have the focus?

WP

 
Hi,

try something like this:

Code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        YourTabControl1.SelectedTab = SomeTabPage
    End Sub

---
[tt][COLOR=white Black]MASTA[/color][COLOR=Black lightgrey]KILLA[/color][/tt] [pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top