mercredi 10 septembre 2014

Ext.tree.Panel node width = 0. Is this configurable?

Pardon my ignorance on this matter, as I am just getting brushed up on ExtJS again, specifically from v3 to v5.


I am attempting to create a rather basic Ext.tree.Panel (xtype = 'treepanel') and the node width appears to be defaulting to 0, as you can see from the wrapped text in my screenshot below. Is this configurable at all? Any way I can get the node width's set so my text does not wrap?



Code:



Ext.define('GreenBackPack.view.main.Main', {
extend: 'Ext.container.Viewport',
requires : [
],
xtype: 'app-main',

controller: 'main',
viewModel: {
type: 'main'
},
height: 400,

layout: {
type: 'center'
},

items: [{
// region: 'center',
xtype: 'tabpanel',
tabPosition: 'left',
tabRotation: 0,
height: '50%',
width: '50%',
//ui: 'navigation',
tabBar: {
cls: 'gbp-tab-cls'
},
items:[{
title: 'Trips',
layout: {
type: 'fit'
},
items:[{
xtype: 'treepanel',
rootVisible: true,
title: 'Chris Trips',
store: 'ChrisTrips'
}]
},
{
title: 'Journeys',
html: '<h2>Content appropriate for the current navigation Journeys.</h2>'
}]
}]
});


Code:



Ext.define('GreenBackPack.store.ChrisTrips',{
extend : 'Ext.data.TreeStore',
root : {
expanded : true,
children : [{
text: 'this is trip one',
leaf : false
},{
text: 'this is trip two',
leaf : false
}]
}
});





Ext.tree.Panel node width = 0. Is this configurable?

Aucun commentaire:

Enregistrer un commentaire