是否可以隐藏标签控件的标签页? [英] Is it possible to hide a tab page of tab control?

查看:117
本文介绍了是否可以隐藏标签控件的标签页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以隐藏选项卡控件的选项卡页?

Is it possible to hide a tab page of tab control?

推荐答案

您可以从控件中删除选项卡页;
You can remove a tab page from the control;
TabPage removedTab = tabControl1.TabPages[1];

tabControl1.TabPages.Remove(removedTab);


如果随后存储了removeTab,则使用以下命令将其添加或插入到选项卡页集合中:


If you then store the removedTab you then add or insert it back into the tab page collection with;

if (removedTab != null)
{
    tabControl1.TabPages.Insert(1, removedTab);
}




or

if (removedTab != null)
{
   tabControl1.TabPages.Add(removedTab);
}


这篇关于是否可以隐藏标签控件的标签页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆