如何在tabcontainer中设置默认登录选项卡 [英] How to set default landing tab in tabcontainer
本文介绍了如何在tabcontainer中设置默认登录选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的Windows窗体中有一个标签容器,几乎有10个标签.
在某些情况下,某些事件我想着重于tabcontainer中的某些选项卡.
I have a tab container in my windows form, there are almost 10 tabs.
under some circumstances, some events i want to focus on some tab in tabcontainer.
How can it is possible?
推荐答案
gotcha ..
tabcontainer.selectedtab = tabname;
gotcha..
tabcontainer.selectedtab=tabname;
假设您拥有带有两个选项卡Tab1(index = 0)和Tab2(index = 1)的TabControl1,则可以使用以下代码将Tab2作为默认选项:
tabControl1.SelectedIndex = 1;
快乐编码! :)
Suppose you have TabControl1 with two tabs Tab1(index=0) and Tab2(index=1), you can use following code to select Tab2 as default:
tabControl1.SelectedIndex= 1;
Happy Coding !! :)
这篇关于如何在tabcontainer中设置默认登录选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文