How to add item to Extjs panel at exact position

18,894

You should use insert() instead of add().

Mypanel.insert(0,cmp1);
Mypanel.insert(4,cmp2);
Share:
18,894

Related videos on Youtube

Lev Savranskiy
Author by

Lev Savranskiy

Front-end / UI developer since 2004. Open to remote roles. Browser JS (React, Angular, RIA, Chrome&firefox plugins) Non-browser JS (node, Adobe acrobat) PHP/SQL (prototypes/production) See portfolio at https://lev-savranskiy.github.io

Updated on June 02, 2022

Comments

  • Lev Savranskiy
    Lev Savranskiy almost 2 years

    I am adding an item to Extjs panel.

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

    It works fine. but in some cases I have to add {new_el} at exact position, not last.

    For example penultimate one.

    Can't find easy method in Extjs 3.2.1