Reputation: 11
I spent very hard times with this issue. There is two major problem in my sample.
1) Whe I maximized the window, right and bottom edges striped out as westRegion width and south region's height.
2) If I set constrain : true and renderTo :'regCenter' then the window not dockable in left and top area of centerRegion.
Is there a bug in ExtJS or my coding mistakes?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css"
href="lib/extjs/resources/css/ext-all.css">
<script type="text/javascript" src="lib/extjs/ext-all.js"></script>
<script>
Ext.onReady(function() {
Ext.create("Ext.container.Viewport",
{ layout : "border",
items: [
{ width : 160, region : "west", split:true,collapsible: true, items: [ ] },
{ height : 60, region : "north", items: [ ] },
{ id : "regCenter", region : "center" }
]
}
);
Ext.create("Ext.window.Window",
{ maximizable : true, width : 350, height : 440,
constrainHeader : true, constrainTo : "regCenter",
dockedItems : [
{ xtype : "toolbar", dock : "bottom",
items : [ { text : "etc" } ]
}
],
items : [ ]
}
).show();
});
</script>
</head>
<body></body>
</html>
Upvotes: 1
Views: 2166
Reputation: 1951
Creating the window after center region renders works, fiddle here: https://fiddle.sencha.com/#fiddle/131
Upvotes: 1