0

Window.doLayout() メソッドに問題があります。表示されるはずのものが画面に表示されません。正確には何も表示されません。メソッドを show() に変更すると正しく動作しますが、匿名関数によって処理されるボタンをクリックしてもパネルが追加されません。ここで助けていただければ幸いです。ありがとう :)

Ext.onReady(function(){
  var childPnl1 = {
    frame : true,
    height : 50,
    html: 'My First Child Panel',
    title : 'First children are fun'
  };
var childPnl2 = {
    width : 150,
    html: 'Second child',
    title : 'Second children have all the fun!'
};
var myWin = new Ext.Window({
  height
    : 300,
  width
    : 300,
  title
    : 'A window with a container layout',
  autoScroll : true,
  items
    : [
    childPnl1,
    childPnl2
  ],tbar : [
  {
    text: 'Add child',
    handler : function() {
    var numItems = myWin.items.getCount() + 1;
    myWin.add({
       title
        : 'Child number ' + numItems,
       height
        : 60,
       frame
        : true,
       collapsible : true,
       collapsed
        : true,
       html
        : 'Yay, another child!'
     });
    myWin.doLayout();
 }
}
]
});
})
4

1 に答える 1