[SOLVED] Scrolling tree inside of accordion panel
In my viewport, I have a west panel with a layout of 'accordion'. So, I add panels to my west panel to create new accordion panels that can expand and contract. What I need to happen is that each new accordion panel sets it's height to 100% of the available height and then shows a scroll bar if the content of the panel exceeds it's height. Here is my code...
//viewport construction...
...
{
region:'west',
id:'west-panel',
title:'Home',
split:true,
collapsible: true,
layout: 'accordion',
margins:'0 0 0 5',
layoutConfig:{
animate:true
}
}
mcp.layout.westPanel = Ext.getCmp('west-panel');
...
//new panel to hold a new tree panel
...
mcp.toc.tocPanel = new Ext.Panel(
{
title: 'Table Of Contents',
iconCls: 'toc',
border: false
}
);
mcp.layout.westPanel.add(mcp.toc.tocPanel);
...
//create the tree panel
...
var Tree = Ext.tree;
var tree = new Tree.TreePanel({
useArrows:true,
animate:true,
enableDD:true,
border: false,
bodyStyle: 'margin: 5px 0 0 0',
loader: new Tree.TreeLoader({
dataUrl: sUrl
})
});
// set the root node
var root = new Tree.AsyncTreeNode({
text: sRootText,
draggable:false,
id:sRootID
});
tree.setRootNode(root);
mcp.toc.tocPanel.add(tree);
...
I just can't seem to get any of the accordion panels to scroll..?
#If you have any other info about this subject , Please add it free.# |