zoukankan      html  css  js  c++  java
  • extjs tablepanel 高度自适应有关问题

    extjs tablepanel 高度自适应问题

    项目中为了给客户好点的功能切换体验,想到了用extjs的tabpanel

    在页面中用了tabpanel后,高度新打开的tab页的iframe 的高度总是出现无法填满页面的情况

    于是被迫给tabpanel指定了高度,为了达到自适应的效果用了

    document.body.clientWidth

    document.body.clientHeight 

    代码如下:

    		Ext.onReady(function() {
    			Ext.BLANK_IMAGE_URL = 'script/extjs/resources/images/default/s.gif';
    			Ext.QuickTips.init();	
    			
    			scrollerMenu = new Ext.ux.TabScrollerMenu({
    				maxText  : 15,
    				pageSize : 5
    			});
    			
    			panel = new Ext.TabPanel({
    				applyTo:document.body,
    		        enableTabScroll:true,
    		        activeTab:0,
    		        resizeTabs:true,
    		        layoutOnTabChange:true,
    		        height:document.body.clientHeight,
    		        plugins:['tabclosemenu',scrollerMenu],
    		        defaults: {autoScroll:true},
    		        items:[{
    		            id: 'testPanel',
    		            iconCls: 'new-tab',
    		            title: '首页',
    		            html:'<iframe id="frmmain" name="frmmain" scrolling="auto" frameborder="0" width="100%" height="100%" src="yz/toHandleElectronDocumentList.action"></iframe>',
    		            closable:false,
    		            autoScroll: true
    		        }
    		        ]
    	    	});
    		});
  • 相关阅读:
    恭喜,贺喜,同喜
    IIS 原理学习
    ASP.NET Ajax 学习(一)服务器端部分
    一张图片引发的血案
    poj 2828 Buy Tickets
    hdu 1556 Color the ball
    nyoj 求余数
    hdu 1358Period
    hdu 3577Fast Arrangement
    poj2752 Seek the Name, Seek the Fame
  • 原文地址:https://www.cnblogs.com/zhwl/p/3825938.html
Copyright © 2011-2022 走看看