Disabling Tab Pages

dusans

Newcomer
Joined
Sep 16, 2002
Messages
20
I'm using TabControl in VB.NET and i don't know how to disable specific TabPage to prevent user to view or activate that page.
 
You can't. This isn't a supported functionality of a tab page, you won't see this done anywhere in Windows. You might want to rethink your interface design. Perhaps you could disable all child controls of a tab page (would be trivial).
 
you could disable or invisible the child controls in a TabPage...
Visual Basic:
Private Sub ChangeTextboxState(ByVal state As Boolean) 
            Dim ctr As Control
            For Each ctr In tabPage1.Controls
                If TypeOf ctr Is TextBox Then
                    ctr.Enabled = state
                End If
            Next
end sub
 
Back
Top