mardi 24 octobre 2017

hbox nested in vbox not shows ExtJS

I'm using ExtJS 3.3.2 and I have a panel with some panels nested in vbox and hbox. The problem is easy: My data from items inside hbox are not showing, I tried modifying weight and height but it never shows up. Looking at the code (F12), I see the data is created, but the panels have a very tiny size.

var i = 0;
jsonResp.forEach(function(currentItem) {
    i++;

var panel = new Ext.Panel({
    id: 'superpanel'+i,
    layout: 'vbox',
    height: 50,
    frame: true,
    collapsible: true,
    items: [{
        xtype: 'panel',
        id: 'jsonObject'+i,
        layout: 'hbox',
        frame: true,
        align: 'stretch',
        items:[{
            id: 'codigo'+i,
            xtype: 'panel',
            html: currentItem.codigo
        },{
            id:'nombre'+i,
            xtype: 'panel',
            html: currentItem.nombre
        },{
            xtype: 'panel',
            html: currentItem.estado.toString()
        }]
    },{
        xtype: 'panel',
        id: 'aviso'+i,
        html: "Error"
    }]
})
Ext.getCmp("contenedor").add(panel);
});
Ext.getCmp("contenedor").doLayout();

I want to create this: enter image description here

What is wrong? I tried it with width/height and flex but it doesn't work.




Aucun commentaire:

Enregistrer un commentaire