有没有办法禁用其他tabpages如果选择当前的一个?我知道tabcontrol不支持启用的属性。 [英] Is there any way to disable other tabpages if current one is selected? I know tabcontrol does not support enabled property.
本文介绍了有没有办法禁用其他tabpages如果选择当前的一个?我知道tabcontrol不支持启用的属性。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果选择当前的一个,有没有办法禁用其他标签?我知道tabcontrol不支持启用的属性。
Is there any way to disable other tabpages if current one is selected??? I know tabcontrol does not support enabled property.
推荐答案
1。 TabControl.Selection事件: - 处理此事件&在这种情况下使用
1. TabControl.Selection event:- handle this event & in this event use
e.Cancel = true
它会阻止选择标签页。
2.您可以使用
it prevents selection of tab page.
2. You can use
tabControl1.TabPages.RemoveByKey("TabPage1");
在form_load中删除tabpages。
in form_load to remove tabpages.
使用 TabControl.Selecting 事件以防止用户更改选定的标签页
Use TabControl.Selecting event to prevent user from changing selected tabpage
这篇关于有没有办法禁用其他tabpages如果选择当前的一个?我知道tabcontrol不支持启用的属性。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文