ext tabpanel 如何设置滚动条

huiyueshuangxing 2011-09-01 03:09:17
各位牛人帮我看一下我的这段代码,在内容超过时,为何不显示滚动条,我已经几天没用解决了。
function initLayout() {
center = new Ext.TabPanel({
id:'homeTab',
region:'center',
renderTo: "tabs",
minTabWidth: 100,
tabWidth: 135,
enableTabScroll:true,
autoShow:true,
border: false,
autoTabs : true,
autoHeight : true,
autoScroll : true,
plugins: [new Ext.ux.TabCloseMenu(), new Ext.ux.TabLogo()]
});

//根据不同的id显示不同的面板
panelt = function(id) {
center.add({
title : id,
id : 'newTab' + id,
closable : true,
shadow : true,
layout : 'fit',
autoHeight : true,
autoWidth : true,

html : "<iframe id='iframeTest' frameBorder=0 src='test.html' scrolling='yes' width='100%' height='100%'></iframe>",
/*
autoLoad : {
url : 'test.html',
scripts : true
},*/

fitToFrame : true
});
center.setActiveTab("newTab" + id);
}
var homePanel = center.add({
title : "Workroom",
//contentEl : "homePage",
html : "<iframe src='http://www.huawei.com' scrolling='yes' width='100%' height='100%'></iframe>",
/*
autoLoad : {
url : 'test.html',
scripts : true
},*/

closable : false,
fitToFrame : true
});


homePanel.show();
}
...全文
548 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
豆虫 2011-09-01
  • 打赏
  • 举报
回复
因为你设置了autoHeight了
去掉这个属性 并设置height:300这样成固定高度 再加上autoScroll:true属性就OK了

87,922

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧