如何在TabPanel2中重新使用TabPanel1的控件 [英] How to RE-USE The Controls Of TabPanel1 in TabPanel2

查看:71
本文介绍了如何在TabPanel2中重新使用TabPanel1的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在TabPanel2中重新使用TabPanel1的控件..



我正在使用标签容器。



其中有两个面板......



一个用于搜索,另一个用于添加数据...





两个tabpanels包含类似的控件..



请建议我如何利用两个面板中的单个控件。

How to RE-USE The Controls Of TabPanel1 in TabPanel2..

I'm Using a Tab-Container.

In Which There are Two Panels...

one for searching and other for adding the data...


both the tabpanels contains similar Controls..

please suggest me how to make use of single control in both the panels.

推荐答案

最简单的方法是创建一个UserControl,让主机拥有两个面板共享的控件。

然后,您将UserControl的一个实例添加到每个选项卡面板 - 我一直这样做。

http://msdn.microsoft.com/en-us/library/a6h7e207(v = vs.90).aspx [ ^ ]
The easiest way is to create a UserControl and have that host the controls the two panels share.
You then add an instance of the UserControl to each tab panel - I do it all the time.
http://msdn.microsoft.com/en-us/library/a6h7e207(v=vs.90).aspx[^]


这篇关于如何在TabPanel2中重新使用TabPanel1的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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