会员
众包
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
super_cj
博客园
首页
新随笔
联系
订阅
管理
2012年7月20日
【原创】C# 批量移除容器内控件的问题 循环移除控件
摘要: 故事的起因:因为需要在每次加载窗体时,删除掉以前遗留的控件(控件为动态生成),故写下如下方法 private void RemoveAllBut(Control comtrol) { for (int i = 0; i <comtrol.Controls.Count; i++) { Control con=comtrol.Controls[i]; if (con is SimpleButton) //判断控件是否为simpleButt...
阅读全文
posted @ 2012-07-20 14:15 super_cj
阅读(827)
评论(0)
推荐(0)
编辑
公告