PDA

View Full Version : Apply Css for a Tree Panel



kmcanil
17 Sep 2012, 1:23 AM
Hi

Am new to Extjs am not able to apply CSS for a tree panel i.e.., Blue Color with all the parent folder names having Bold Font.
Child nodes folder names having blue color without having bold font.

Give me an example for this if possible.

Thanks
AnilKumar K

dawesi
17 Sep 2012, 5:11 AM
if you are using firebug or webkit you can right click on a tree item and click on 'inspect element' and inspect the underlying css that you can modify in your own css file.

sword-it
17 Sep 2012, 5:24 AM
Hi dawesi,

You can change text-style, text-color by give a custom css like-



.customCss{
color:blue !important;
}




Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 200,
height: 150,
//store: store,
rootVisible: false,
viewConfig:{
cls:'customCss'
},
renderTo: Ext.getBody()
});


Here is working sample example- http://jsfiddle.net/maneeshgo/jzsWH/