ExtJs 4,从容器中删除控件并将其从内存中删除的正确方法是什么? [英] ExtJs 4, what is the right way to Delete control from container and Remove it from the memory?

查看:159
本文介绍了ExtJs 4,从容器中删除控件并将其从内存中删除的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题很简单,但我找不到一个很好的答案。



正确的方法是:


  1. 从容器中删除控件

  2. 在ExtJs 4中从内存中删除它


解决方案

Ext。 AbstractContainer.remove 方法不能太远。


remove(Component / String component,
[Boolean autoDestroy]):Void




容器中删除一个组件。在删除之前触发 beforeremove
事件,然后在组件已删除
之后触发
删除事件。参数




  • 组件组件/字符串


  • autoDestroy 布尔值
    (可选)
    自动调用已删除的组件的
    Ext.Component.destroy函数。
    默认为此Container的autoDestroy配置的值。




The question is simple but i can't find a good and clear answer for it.

What is the right way to:

  1. Delete control from container
  2. Remove it from the memory, in ExtJs 4?

解决方案

Ext.AbstractContainer.remove method can't be far off.

remove( Component/String component, [Boolean autoDestroy]) : Void

Removes a component from this container. Fires the beforeremove event before removing, then fires the remove event after the component has been removed. Parameters

  • component : Component/String The component reference or id to remove.

  • autoDestroy : Boolean (optional) True to automatically invoke the removed Component's Ext.Component.destroy function. Defaults to the value of this Container's autoDestroy config.

这篇关于ExtJs 4,从容器中删除控件并将其从内存中删除的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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