PDA

View Full Version : TreePanel scrolling disabled with heigh set to 100%



lads
21 May 2014, 7:05 AM
I have a TreeNode that is populated with a large number of nodes and must thus be scrollable. I am able to make it scrollable with the following code:



myTree = new Ext.tree.TreePanel({
id:"myTree",
region: "south",
width: "100%",
collapsible: true,
autoScroll: true,
enableDD: true,
root: myTreeRoot,
rootVisible: false,
lines: false,
viewConfig: {
style: { overflow: 'scroll'}
},
});

And later setting the element height after rendition:



Ext.getCmp('myTree').el.dom.style.height = "700px;

The obvious problem with this is the fixed height of the TreeNode. If the user resizes the window, or uses a different resolution, the TreeNode will not be fully visible. But if I set the height to 100%:



Ext.getCmp('myTree').el.dom.style.height = "100%";

The scroll bar is rendered but is disabled. How can I enable it? Or just make it work with height set to 100%?

I am using ExtJS 3.4. Thank you.

lads
18 Jun 2014, 6:33 AM
Bump.

lads
6 Aug 2014, 6:52 AM
Bump.