选择tabControl的特殊选项卡 [英] Select a special tab of tabControl

查看:74
本文介绍了选择tabControl的特殊选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我有一个tabControl,我想要,该程序在用户单击按钮时显示第二个选项卡,所以我该怎么做?

:Doostl

Hi !

I have a tabControl and i want, the program shows second tab when user clicked on a button so how can i do it?

:Doostl

推荐答案

这取决于您使用的选项卡控件.大多数都具有允许您设置活动选项卡的客户端API.
it depends what tab control you are using. Most have a client-side API that allows you to set the active tab.


tabControl.SelectedItem = tabPage;




or

tabControl.SelectedIndex = n; // where "n" is the index of the desired tab


tabControl1.SelectedTab.Text =="string"//其中string是制表符文本的文本
tabControl1.SelectedTab.Text == "string" //where string is a text of tab text


这篇关于选择tabControl的特殊选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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