下面代码 我出来的 treepanel 没有滚动条,谁能帮我处理这个问题不????
Ext.onReady(function(){
Ext.QuickTips.init();
var tree=new Ext.tree.TreePanel({
title: '菜单',
region: 'west',
split: true, // 设置拖曳
animate : true, // 菜单动画效果
frame: true,//True表示为面板的边框外框可自定义的
collapsible: true,
enableDD: true,
enableDrag: true,
rootVisible: false,
authScroll: true,
containerScroll: true,
// dropConfig: {appendOnly:true},
width: 215,
height: 400,
minSize: 180,
maxSize: 300,
style: "background-color:#FFFFFF;border-color:#0099FF;",
loader:new Ext.tree.TreeLoader({dataUrl:'carservice/us!UserTree.action'}),
root:new Ext.tree.AsyncTreeNode({id:' ',text:'菜单',draggable : false})
});
Ext.EventManager.onWindowResize(function(w,h){
tree.syncSize();
},this,true);
var root=tree.getRootNode();
root.expand();
tree.on("click",function(node,event){
event.stopEvent();
var n = tab.getComponent(node.id);
if(!n){
var tabUrl = node.attributes.link;
if(tabUrl==null)
{
return;
}
// alert(tabUrl+node.id+node.text);
n = tab.add({
'id':''+node.id,
'title':''+node.text,
'closable':true,
layout: 'fit',
//通过html载入目标页
// html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src='+tabUrl+'></iframe>'
html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src='+tabUrl+'></iframe>'
// autoLoad:{url:tabUrl,scripts:true}
});
}
n.show().doLayout();
tab.setActiveTab(n);
})
var tab=new Ext.TabPanel({
region: 'center',
animScroll:true,
enableTabScroll:true,
width:800,
height:500,
defaults: {autoScroll:true},
// plugins: new Ext.ux.TabCloseMenu(),
// layout:'fit',
items:[{title:'首页'}]
});
var viewport=new Ext.Viewport({
layout:'border',
items:[
{region:'north',height:80,html:""},//,split: true,title:'north', collapsible: true
tree,tab//,
// {region:'south',split: true,title:'south', collapsible: true,height:20,html:'内容区'}
]
});
});