6 * @extends Roo.ContentPanel
7 * @parent Roo.BorderLayout Roo.LayoutDialog builder
11 * Create a new TreePanel. - defaults to fit/scoll contents.
12 * @param {String/Object} config A string to set only the panel's title, or a config object
14 Roo.TreePanel = function(config){
16 var tree = config.tree;
18 delete config.el; // hopefull!
20 // wrapper for IE7 strict & safari scroll issue
22 var treeEl = el.createChild();
23 config.resizeEl = treeEl;
27 Roo.TreePanel.superclass.constructor.call(this, el, config);
30 this.tree = new Roo.tree.TreePanel(treeEl , tree);
32 this.on('activate', function()
34 if (this.tree.rendered) {
37 //console.log('render tree');
40 // this should not be needed.. - it's actually the 'el' that resizes?
41 // actuall it breaks the containerScroll - dragging nodes auto scroll at top
43 //this.on('resize', function (cp, w, h) {
44 // this.tree.innerCt.setWidth(w);
45 // this.tree.innerCt.setHeight(h);
46 // //this.tree.innerCt.setStyle('overflow-y', 'auto');
53 Roo.extend(Roo.TreePanel, Roo.ContentPanel, {
57 * @cfg {Roo.tree.TreePanel} tree [required] The tree TreePanel, with config etc.