Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/340.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在tabcontrol(winforms)中的单个选项卡上设置可见性_C#_Winforms_Tabs_Tabcontrol - Fatal编程技术网

C# 在tabcontrol(winforms)中的单个选项卡上设置可见性

C# 在tabcontrol(winforms)中的单个选项卡上设置可见性,c#,winforms,tabs,tabcontrol,C#,Winforms,Tabs,Tabcontrol,有没有办法设置tabcontrol中单个选项卡的可见性?我认为像这样简单的事情应该行得通,但似乎什么都不行 tabControl1.TabPages[1].Visible = false; tabControl1.Refresh(); 将有一个始终显示的主选项卡,但我希望有其他选项卡可以“打开\关闭”。我不想删除选项卡,因为我可能需要再次显示 自2.0以来,fk时间从未改变: 它显然不是标准Windows窗体库的一部分,但是(除其他功能外)每个选项卡页都有一个可见属性。您可以删除选项卡控件

有没有办法设置tabcontrol中单个选项卡的可见性?我认为像这样简单的事情应该行得通,但似乎什么都不行

tabControl1.TabPages[1].Visible = false;  
tabControl1.Refresh();
将有一个始终显示的主选项卡,但我希望有其他选项卡可以“打开\关闭”。我不想删除选项卡,因为我可能需要再次显示


自2.0以来,fk时间从未改变:


它显然不是标准Windows窗体库的一部分,但是(除其他功能外)每个选项卡页都有一个可见属性。

您可以删除
选项卡控件

this.tControl1.TabPages.Remove(this.tControl1.TabPages["tabPageName"]);
副本(根据以下Philip的回复)