Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何同时将控件添加到两个不同的容器中?
例如:我有TabPage1,TabPage2和一个文本框控件。我希望将文本框同时添加到两者TabPage1中TabPage2。
TabPage1
TabPage2
我相信不可能同时在两个容器中进行控制。一个在大多数情况下都有效的简单解决方法(尤其是在选项卡控件的情况下)是在另一个容器变得可见时(例如,当用户切换选项卡页时)将控件从一个容器移动到另一个容器。