Xtratab根据C#winforms中的菜单选项控制更改标签页 [英] Xtratab control change tab pages according to menu option in C# winforms

查看:112
本文介绍了Xtratab根据C#winforms中的菜单选项控制更改标签页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个xtratab控件和一些标签页,例如entry,report。我想根据我选择的菜单选项选择标签页。例如,在菜单选项中,如果我选择条目,则应打开输入标签页,如果我从菜单报告标签页中选择报告,则应打开。



我有什么尝试过:



我用Google搜索但无法找到。

解决方案

我'我一点也不熟悉第三方DevExpress控件,但快速的Google显示他们的选项卡控件具有许多与标准版本相同的属性。



所以。 ..simply设置 SelectedTabPage SelectedTabPageIndex 属性的值。对于前者,只需将其设置为包含所需标签页的变量即可。对于后者,只需将其设置为所需标签页的从零开始的索引。



如需参考,请参阅:



XtraTabControl会员| WinForms控件| DevExpress帮助 [ ^ ]

I created one xtratab control and some tab pages like entry, report. I want to select tab page according the menu option what I selected. For example in menu option if I select entry then entry tab page should open and if I select reports from menu reports tab page should open.

What I have tried:

I googled for that but unable to find.

解决方案

I'm not at all familiar with the 3rd party DevExpress controls, but a quick Google shows that their tab control has many of the same properties as the standard version.

So...simply set the value of the SelectedTabPage or the SelectedTabPageIndex property. For the former, simply set it to the variable that contains the desired tab page. For the latter, simply set it to the zero-based index of the tab page you want.

For reference, see:

XtraTabControl Members | WinForms Controls | DevExpress Help[^]


这篇关于Xtratab根据C#winforms中的菜单选项控制更改标签页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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