var tree = Ext.create('Ext.tree.Panel', {
store: store,
rootVisible: false,
//useArrows: true,
frame: true,
title: 'Vehicle List',
region:'west',
width: 200,
root: {
expanded: true
},
checked : false,
height: 250,
dockedItems: [{
xtype: 'toolbar',
items: {
text: 'Get checked nodes',
handler: function(){
var records = tree.getView().getChecked(),
names = [];
Ext.Array.each(records, function(rec){
names.push(rec.get('MainID'));
});
Ext.MessageBox.show({
title: 'Selected Nodes',
msg: names.join('<br />'),
icon: Ext.MessageBox.INFO
});
}
}
}]
});
我怎样才能让树扩大?我试过了
root: {
expanded: true
}
但它仍然不起作用。