如何从面板中删除项目 [英] How to remove item from Panel
本文介绍了如何从面板中删除项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有容器,其中有框
, textfield
和按钮
。我在一个面板中添加该容器。当我点击按钮
我想删除该容器。问题是,容器已被删除,但没有在UI上显示。
I have container, which have box
,textfield
and button
. I am adding that container in one panel. When I am clicking on button
I want to remove that container. Problem is, Container is removed but it not showing on UI.
我的代码是从面板中删除容器。
My Code where I am removing container from panel.
var panel = Ext.getCmp("ABC");
var record = panel.items.items;
var recordlength = record.length;
for (var j = 0; j < recordlength - 1; j++) {
if (record[j].Label == me.Label) {
record.remove(me);
panel.remove();
}
}
推荐答案
你说你可以删除容器,然后尝试这样来更新你的面板。
As you say you are able to remove container then try this to update your panel.
panel.update();
panel.doLayout();
从中删除项目后,将更新您的面板。
It will update your panel after removing item from that.
这篇关于如何从面板中删除项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文