我在一個寬度爲50%的頁面中有一個div。我使用renderTo將該面板附加到該div,但是當我更改窗口大小時,我的面板不會調整大小並保持原始大小。extjs在調整大小時在面板上的寬度爲100%
var vp = Ext.create('Ext.panel.Panel',{
plugins : ['fittoparent'],
height: 400,
layout: 'fit',
flex:1,
renderTo: Ext.get("scheduler-container"),
items:[
{
xtype: 'resource-list',
layout : 'fit',
resource: resourceResponse,
event: eventResponse,
serverDateFormat: serverDateFormat,
startViewRange: startDate,
endViewRange: endDate,
readOnlyView: true,
showCurrentTime: true,
dateToScrollTo: now,
getEvents: ResourceScheduler.getAllEvents,
getResources: ResourceScheduler.getResources,
timeZoneOffset: timeZoneOffset
}
]
});
我碰到這個http://www.sencha.com/forum/showthread.php?28318-Fit-to-parent &亮點=調整'>插件,並試圖如果它的工作原理。不幸的是,它只適用於擴展窗口,而不適用於縮小窗口。我想知道是否有人成功完成製作100%寬×高100%的面板。
它不接受百分比 – powerfade917
面板不接受寬度和高度的百分比。 – Kathir