【发布时间】:2014-04-22 06:00:44
【问题描述】:
我有几个面板,布局是 vbox 和 hbox dbclick面板标题时如何实现最大和最小功能 这是代码:
Ext.create('Ext.panel.Panel', {
style: 'padding:0 10px 0 10px',
layout: {
align: 'stretch',
type: 'vbox'
},
renderTo: Ext.getBody(),
items: [{
xtype: 'panel',
border: 0,
layout: {
align: 'stretch',
type: 'vbox'
},
items: [{
xtype: 'panel',
height: 100,
title: 'title1',
html: 'panel1'
}, {
xtype: 'panel',
height: 100,
title: 'title2',
html: 'panel2'
}]
}, {
xtype: 'panel',
border: 0,
layout: {
align: 'stretch',
type: 'hbox'
},
items: [{
xtype: 'panel',
title: 'title3',
height: 100,
flex: 1,
html: 'panel3'
}, {
xtype: 'panel',
title: 'title3',
flex: 1,
html: 'panel4'
}]
}]
});
我有两个问题:
- 如何在面板标题上添加 dbclick 事件
- 如果使用折叠和展开,当dbclick在panel1上时,如何设置panel3和panel4折叠顶部: http://jsfiddle.net/SLHjn/1/
谢谢。
【问题讨论】: