PDA

View Full Version : panel.Tree layout problem using xtype: "treecolumn"



muselmanach
24 Aug 2012, 4:16 AM
My Question is: How do i get rid of this useless scrollbar? (without disabeling scrolling when really needed)

The problem is the treepanel within the accordion layout, out of the accordion it works fine.
38225
I am getting this tree.Panel using this code:



var form = new Ext.form.Panel({id:'formpanel', frame: true,title: "form"});

new Ext.panel.Panel({renderTo: document.body, layout: "accordion", items:[form]});

//just store and model

Ext.define('model_tree',{extend:'Ext.data.Model',fields:[new Ext.data.Field({name:'text',type:'string'}),new Ext.data.Field({name:'text',type:'string'}),new

Ext.data.Field({name:'path',type:'string'})],proxy:{type: 'localstorage', model: 'model_tree', id: 'model_tree', reader: 'json', writer: 'json'}});


Ext.define('store_tree',{autoLoad:true,model:'model_tree',extend:'Ext.data.TreeStore',folderSort:true});

//my tree

var tree = new Ext.tree.Panel({height:220,id:'tree',plugins:[Ext.create
('Ext.grid.plugin.CellEditing')],width:250,autoScroll:true,xtype:'treepanel',autoDestroy:true,closable:false,title:'',viewConfig:{plugins: {ptype: 'treeviewdragdrop'}},autoHeight:true,columns:
[{id:'tree_text',xtype:'treecolumn',sortable:true,dataIndex:'text',text:'',editor:'textfield'}],forceFit:true,hideHeaders:true,store:new store_tree
(),loadMask:false,name:'tree',animate:false,rootVisible:false,selType:'cellmodel'});

//adding tree to form
Ext.getCmp("formpanel").add(tree);

//setting some data on my tree

tree.setRootNode({
text: 'Ext JS',
id: 'root',
expanded: true,
children: [
{"id":"root.cars","path":"cars","text":"cars","children":[
{"id":2,"description":"aston martin desc","path":"cars.aston martin","text":"aston martin","leaf":true}]}]});
tree.expandAll();








thx muselmanach

scottmartin
24 Aug 2012, 8:44 PM
This has been corrected in the latest version. Do you have a support subscription to download the latest build?

Scott.

muselmanach
25 Aug 2012, 1:21 AM
Not at the moment, but i am planing to purchase a ExtJS4 + Standard Support in the next couple of weeks