PDA

View Full Version : percent width or height for a window is not supported?



henry42
25 May 2012, 12:04 AM
Extjs 4.0
I can set the percent width or height of the viewport


Ext.Window( {
width:'80%',
height:'80%'
} )


but now Extjs 4.1
it is not supported , is the feature removed ?

MaximusDecimus
25 May 2012, 12:24 AM
Does this work:

width: 0.8,
height: 0.8

??

henry42
3 Jun 2012, 7:46 PM
Does this work:

width: 0.8,
height: 0.8

??

i fixed it by this



listeners : {
show : function(){
var size = Ext.getBody().getViewSize();
this.setHeight(.8 * size.height );
this.setWidth(.8 * size.width );
this.alignTo(this.container, 'c-c');
}
}