PDA

View Full Version : Autoshow resize frame for ext js Window



Naveen.r
14 Aug 2014, 8:24 PM
Hi all,

We have we windows in our application similar to the Desktop (http://docs.sencha.com/extjs/4.2.1/#!/example/desktop/desktop.html) sample. I was wondering if there is a way to show the re-size frame automatically when the mouse is over the border of window (like the panel). I tried setting following config. But doesn't seems to make any change. eg : https://fiddle.sencha.com/#fiddle/8ur

resizable:{
el: 'elToResize',
handles: 'all',
transparent:false,
pinned : true,
},

Thanks in advance
Naveen

slemmon
18 Aug 2014, 10:38 PM
I'm afraid the window styling overrides the resizer styles. I suspect the closest you'll get is to use a panel and set it to floating: true. Though, that omits the window styling for the frame of the panel as well as some functions that window has like being able to maximize.

Naveen.r
18 Aug 2014, 11:05 PM
Thanks Slemmon,


I managed to make it working by removing the window style 'x-window-handle' from the all the resize handle create under the window in DOM. Do you foresee any problem with the below method?



afterShowWindow: function(wnd){
var me = this;
var childs = me.el.dom.childNodes;
for( i in childs){
var domElement = childs[i];
if( domElement != undefined && domElement.className != undefined &&
-1 == domElement.className.indexOf("handle")){
continue;
}
var el = Ext.get(domElement);
if( el!= null){
el.removeCls('x-window-handle');
}
}
},