Articles in this section
Category / Section

How to enable or disable the specific tab at runtime in WinForms TabControlAdv?

1 min read

Enable or disable the specific tab at run time

User can enable or disable the specific tab page at run time. It can be achieved by TabEnabled property of tab page. The following code demonstrates the same.

C#

//Enable the specific tab page
this.tabPageAdv2.TabEnabled = true;
this.tabPageAdv3.TabEnabled = true;
 
//Disable the specific tab page
this.tabPageAdv2.TabEnabled = false;
this.tabPageAdv3.TabEnabled = false;

VB

'Enable the specific tab page
Me.tabPageAdv2.TabEnabled = True
Me.tabPageAdv3.TabEnabled = True
 
'Disable the specific tab page
Me.tabPageAdv2.TabEnabled = False
Me.tabPageAdv3.TabEnabled = False

Screenshot

Show the disable tab page

Figure: Tab pages disabled.

Show the enable tab page

Figure: Tab pages enabled.

 

Samples:

C#:  TabControlAdvExample

VB:  TabControlAdvExample

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied