方法一:

  panel->ComponentCount属性获得panel所拥有的控件个数

  panel->Components[i]属性获得某一个控件

  delete panel->Components[i]; 删除此控件

说明,方法一适用于可编辑界面编辑的控件

        for(i=pnl_disPlayPanel->ComponentCount-;i>=;i--);
{
delete pnl_disPlayPanel->Components[i];
}

方法二:

      先保存panel组件的Top 、Left、Width、Height 等属性

  然后,delete panle;

  现在,从新生成一个panel ,new TPanel;

  最后,将已保存的panel属性赋值给新的panel

指定panel的父组件 panel->parent=?;

说明,方法二适用于,程序代码根据需要动态创建多个panel子控件,然后需要删除的情况。

   double pnlTop=,pnlLeft=,pnlWidth=,pnlHeight=;
pnlTop=pnl_disPlayPanel->Top;
pnlLeft=pnl_disPlayPanel->Left;
pnlWidth=pnl_disPlayPanel->Width;
pnlHeight=pnl_disPlayPanel->Height; delete pnl_disPlayPanel; pnl_disPlayPanel = new TPanel(this);
pnl_disPlayPanel->Top=pnlTop;
pnl_disPlayPanel->Left=pnlLeft;
pnl_disPlayPanel->Width=pnlWidth;
pnl_disPlayPanel->Height=pnlHeight;
pnl_disPlayPanel->Parent=ts_typeSetPage;

BCB6.0 清除TPanel面板上的所有控件的更多相关文章

  1. swing实现QQ登录界面1.0( 实现了同一张图片只加载一次)、(以及实现简单的布局面板添加背景图片控件的标签控件和添加一个关闭按钮控件)

    swing实现QQ登录界面1.0( 实现了同一张图片只加载一次).(以及实现简单的布局面板添加背景图片控件的标签控件和添加一个关闭按钮控件) 代码思路分析: 1.(同一张图片仅仅需要加载一次就够了,下 ...

  2. 在此页上的ActiveX控件和本页上的其他部分的交互可能不安全,你想允许这种交互吗

    转自 http://www.cnblogs.com/zdxster/archive/2011/01/27/1945868.html 在EOS6的项目中,如果采用VC++开发的ActiveX,那么第一次 ...

  3. 在Web上调用Ocx控件

    原文:http://blog.csdn.net/goodadult2012/article/details/6343369 在HTML页面中使用ActiveX控件包含三个基本操作:将控件放入HTML中 ...

  4. Webform之FileUpload(上传按钮控件)简单介绍及下载、上传文件时图片预览

    1.FileUpload上传控件:(原文:http://www.cnblogs.com/hide0511/archive/2006/09/24/513201.html) FileUpload 控件显示 ...

  5. 【Android】11.0 UI开发(二)——列表控件ListView的简单实现1

    ************************ 转载请注明出处:https://www.cnblogs.com/xiaofu007/p/10342462.html ***************** ...

  6. 在此页上的 ActiveX 控件和本页上的其它部份的交互可能不安全

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息http://xqy266.blogbus.com/logs/66258230.html 在EOS6的项目中,如果采用VC++开发的Active ...

  7. 兼容IE浏览器样式的html上传文件控件

    最近在公司做项目时需要用到html的上传文件控件,但发现原生的上传文件控件<input type="file" />在IE.Chrome浏览器的显示效果相差很大,为了统 ...

  8. WPF解决按钮上被透明控件遮盖时无法点击问题

    原文:WPF解决按钮上被透明控件遮盖时无法点击问题 IsHitTestVisible="False" 在控件上设置如上属性即可,即可让透明控件不触发点击效果

  9. Vue的 $parent,并不能准确找到上一层的控件,所以如果需要,需要填坑这个 bug,递归寻找下上级

    Vue的 $parent,并不能准确找到上一层的控件,所以如果需要,需要填坑这个 bug,递归寻找下上级 // Find components upward function findComponen ...

随机推荐

  1. 主从读写分离----mysql-proxy0.8.5安装与配置

    废话不多说,直接开干: 1.安装环境: yum -y install libevent glib2 lua gcc gcc-c++ autoconf mysql-devel libtool pkgco ...

  2. 业界微服务楷模Netflix是这样构建微服务技术架构的

    1. 如不考虑组织架构,直接切入技术架构(很多架构师的通病),则失败风险巨大. https://mp.weixin.qq.com/s/C8Rdz9wFtrBKfxPRzf0OBQ

  3. Multiple SSH keys for different accounts on Github or Gitlab

    [inside this square brackets give a name to the followed acc.] name = github_username email = github ...

  4. mongodb 数组查询

    转发自:https://blog.csdn.net/leshami/article/details/55049891 一.演示环境及数据> db.version() 3.2.11 > db ...

  5. LeetCode 965 Univalued Binary Tree 解题报告

    题目要求 A binary tree is univalued if every node in the tree has the same value. Return true if and onl ...

  6. 《Redis 持久化》

    一:什么是持久化?    - Redis 是内存级别的数据库.所谓持久化,即把数据(如内存中的对象)保存到可永久保存的存储设备中(如磁盘)中. - 可以持久读取操作等的数据. - Redis 支持 R ...

  7. jq优化

    1.使用链式写法 $('div').find('h3').eq(2).html('Hello');采用链式写法时,jQuery自动缓存每一步的结果,因此比非链式写法要快.根据测试,链式写法比(不使用缓 ...

  8. C# Asp.net 修改Ueditor编辑器上传图片保存路径

    默认情况下Ueditor图片上传的保存路径是在/ueditor/net/upload/目录下,(如:http://localhost/ueditor/net/upload/123.png), 但是有时 ...

  9. 实现用 jquery 禁用浏览器的前进后退按钮

  10. zabbix server源码安装

    一.准备工作 yum -y install net-snmp-devel php-bcmath php-ctype php-xml php-xmlreader php-xmlwriter php-se ...