【问题标题】:How to add item to Extjs panel at exact position如何将项目添加到 Extjs 面板的确切位置
【发布时间】:2011-10-01 09:37:02
【问题描述】:

我正在向 Extjs 面板添加一个项目。

this.add(new_el);
this.doLayout();

它工作正常。但在某些情况下,我必须在确切位置添加 {new_el},而不是最后。

例如倒数第二个。

在 Extjs 3.2.1 中找不到简单的方法

【问题讨论】:

标签: extjs panel extjs3


【解决方案1】:

您应该使用insert() 而不是add()

Mypanel.insert(0,cmp1);
Mypanel.insert(4,cmp2);

【讨论】:

    猜你喜欢
    • 2012-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-17
    • 1970-01-01
    相关资源
    最近更新 更多