请教各位大虾们,在EXT里,BorderLayout在设置其中各布局空间宽度时,一般是通过设置LayoutRegion的实际宽度,即使用绝对宽度来定义的,比如说initialSize:400这样写法,不过绝对的大小会在显示器不同分辨率真下产生显示上的差异,我用台机的液晶和用笔试本来看,就会有很大的不同,有没有可以使用百分比的方法来设置宽度的?在网上找了半天也没有相关的介绍,小弟先谢谢大家了,在线等答案,最好能请知道的朋友给写一个大概的示例
解决方案 »
- 关于flexpaper如何引用项目外的swf的问题
- 问个正则表达式意思
- 错误: 对象不支持此属性或方法
- <script src="js/haoku.js?v=3.4"></script>
- $(document) 提示 Error: Object doesn't support this property or method 都有什么可能呢?
- (BlueDestiny) 出道javascript的题, 顺带散分~
- 简单的JS问题
- 网页内容显示不全,请各位帮忙分析一下原因好吗,很急,万分感谢!
- 关于模式窗口[showModalDialog]的Title的疑问
- 如何屏蔽安全提示框?????
- js在某页设置了COOKIE另一页读不出(有时读出设置前的)
- jquery怎样修改onclick属性值
var mainWinWidth = window.document.body.clientWidth;
var mainWinHeight = window.document.body.clientHeight;
var grid = new Ext.grid.GridPanel({
renderTo:'main',
height:mainWinHeight-50,
width:mainWinWidth,
...
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
return { pWidth:pageWidth, pHeight:pageHeight, wWidth:windowWidth, wHeight:windowHeight };
}