Disabling Tab Pages

dusans

Member
Joined
Sep 16, 2002
Messages
20
Im using TabControl in VB.NET and i dont know how to disable specific TabPage to prevent user to view or activate that page.
 
You cant. This isnt a supported functionality of a tab page, you wont 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...
Code:
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