-
6 Sep 2012 10:09 AM #1
[Ext 4.1.1] Window maximized fail
[Ext 4.1.1] Window maximized fail
Tested:PHP Code:Ext.onReady(function(){
Ext.create('Ext.container.Viewport', {
layout: 'border',
disabled: false,
items: [
Ext.create('Ext.panel.Panel', {
height: 42,
margins: 0,
region: 'north',
baseCls: 'x-plain'
}),
Ext.create('Ext.panel.Panel', {
margins: 0,
region: 'center',
id: 'mainPanel',
layout: {
type: 'hbox',
align: 'stretch'
},
items:[
Ext.create('Ext.panel.Panel', {
width: 300,
margins: 0,
border: false,
autoScroll: true,
bodyStyle: 'background:#eee;',
items:[{
xtype: 'treepanel',
flex: 1,
collapsible: true,
titleCollapse: true,
margin: 10,
frame: true,
rootVisible: false,
lines: false,
listeners: {
itemclick: function(view,rec,item,index,e,opt){
rec.raw.handler(rec.id);
},
itemdblclick: function(){
return false;
}
},
title: 'Menu title',
store: Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [{
text: 'Open maximized window',
leaf: true,
handler: function(id){
Ext.create('Ext.window.Window', {
autoShow: true,
width: 600,
height: 400,
constrainHeader: true,
renderTo: Ext.get('mainPanel'),
maximizable: true,
maximized:true,
html: 'Why can drag this window?',
minimizable: false
});
}
}]
}
})
}]
}),
Ext.create('Ext.panel.Panel', {
margins: 0,
})
]
})
]
});
});
windows 7 x64 sp1
chrome 21
-
6 Sep 2012 10:14 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 435
Are you meaning to only constrain it to the center region and not the entire browser window?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
6 Sep 2012 11:06 AM #3
use an xtype: 'window' as a child item of the mainPanel.
Then you can access it using CQ whenever you need.
Don't forget closeAction: 'hide'Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
6 Sep 2012 3:19 PM #4
-
6 Sep 2012 3:41 PM #5
Agreed, you shouldn't be able to drag that window.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-7185
in
4.1.3 Sprint 1.


Reply With Quote