I'm looking to start customizing a Sencha 4 Tree panel, adjusting elements like text size and background colors. So far, I haven't been able to figure out the right approach, whether it's through viewConfig or some other method. Here's the code I currently have:
JS:
var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [
{ text: "detention", leaf: true },
{ text: "homework", expanded: true, children: [
{ text: "book report", leaf: true },
{ text: "algebra", leaf: true}
] },
{ text: "buy lottery tickets", leaf: true }
]
}
});
Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 400,
height: 250,
store: store,
rootVisible: false,
renderTo: 'nav'
});
HTML:
<div id='nav'>
</div>
CSS:
#nav .x-tree-node-text {
font-size: 1.3em;
background-color: #c0c0c0;
}
Is there a better method to achieve this customization? I appreciate any guidance!