PDA

View Full Version : Accordion



ramin_ramin
یک شنبه 04 مهر 1389, 10:10 صبح
من داخل یک Accordion چند تا Panel دارم که میخواهم داخل هرکدام از این Panel ها لینک بزارم و یا دکمه بگزارم
اگر کسی کمک کنه ممنون میشم

jReihane
سه شنبه 06 مهر 1389, 22:08 عصر
سلام،
مشكلتون دقيقا چي هست؟
يه نمونه از accordion رو براتون مي ذارم... اگر دقيقتر بگين كه چه چيزي مي خواين بيشتر مي تونم كمكتون كنم.



function func(){
var panel = new Ext.Panel({
renderTo:Ext.getBody(),
layout: 'accordion',
defaults:{
autoHeight: false,
height: 250
},
layoutConfig:{
fill: true,
animate: true
},
items:[{
title: 'first panel',
items:[{
xtype: 'label',
html: '<a href="http://www.google.com">Click (http://www.google.com%22%3eclick/) me to visit Google site! </a>'
}]
},{
title: 'second panel',
items:[{
xtype: 'label',
text: 'put a form in your accordion panel then put anything you want to be in your form in it' +
' just add items to form!'
},{
xtype: 'button',
text: 'Click me!',
handler: function(btn){
Ext.Msg.show({
title: 'a button is clicked',
msg: 'Now click OK!',
buttons: Ext.Msg.OK
});
return false;
}
}]
},{
title: 'third panel',
html: 'You can create panels as many as you want!'
}]
});
}
Ext.onReady(func);