TabPage处理和重新添加 [英] TabPage disposing and re-adding

查看:110
本文介绍了TabPage处理和重新添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个tabControl包含3个标签页并且我处理了tabpage3,我可以用它的内容重新添加它(不是添加空标签页)吗?

If i have a tabControl contains 3 tab pages and i disposed tabpage3, can i re-add it with it''s content (not to add empty tabpage) ?

推荐答案

否。

一旦你处置了对象,如果你试图重新使用它就会出现错误,因为资源已被释放。



你可以创建一个新的页面实例并添加它。
No.
Once you Dispose on object you will get an error if you attempt to re-use it as it''s resources have been released.

You can create a new instance of the page and add that though.


这篇关于TabPage处理和重新添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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