PDA

View Full Version : Not adding card to carousel ,but display on window resize.



fukajun
25 Mar 2011, 12:07 AM
Hi everyone

I want to use tabPanel, form and carousel.
I want to adding carousel card on click at form-button.
but card wasn't display.
I tried to resize browser window.
Then new card display was
What is wrong? :-/

????????????????????????????
?????????????????????????????????
???????????????????????????
????????????



Ext.setup({
onReady: function() {

// Contents page
var pagePanel = new Ext.Carousel({
title:'Pages',
id:'page',
items:[
]
});
// input page
var inputPanel = {
title: 'Input',
xtype: 'form',
id: 'inputform',
items:[
{
xtype: 'fieldset',
title: 'Input',
items:[{
xtype: 'textareafield',
id:'textarea',
name: 'name',
placeHolder: 'contents',
autoCapitalize: true,
required:true
}]
}, {
layout:'vbox',
items:[{
xtype:'button',
text:'update',
handler: function(){
pagePanel.add(new Ext.Panel({html:'<h1>new panel</h1>'}));
pagePanel.doLayout();
pagePanel.setActiveItem(0);
pagePanel.doComponentLayout();
panel.doLayout();
}
}]
}]
};


var tabPanel = new Ext.TabPanel({
items:[inputPanel,pagePanel]
});

var panel = new Ext.Panel({
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
defaults: {
flex: 1
},
items: [tabPanel]
});
}
});