How to change the default font-size of dhtmlxTree?

I am using dhtmlxSuite_v26_pro_101011 version, Is there have any ways to set the font size to larger ?

Thanks !!


You may change the font size with setItemStyle() method
For example:
tree.setItemStyle(itemId,“font-size: 12px !important”)

But it will change the size only for one specific item.
Yo change font size to all tree you should use the CSS.

  1. change which css file ?
  2. add or modify which entries ?

Thanks !!

Hi again,

Please, look at the example code:

<style> .dhxtree_dhx_skyblue .standartTreeRow { font-size: 18px !important; } .dhxtree_dhx_skyblue .standartTreeRow_lor { font-size: 18px !important; } </style>

Hi all,

Not quite so fast. I tried the code for increasing the font-size described in this thread, but that messed up line space. Appears that cell size needs to be increased as well, because increasing the font size cuts off the bottoms of characters such as “g”. I wanted 1 additional px in font size. For now I kludged the following, but probably not entirely correct:

[code].dhxtree_dhx_skyblue .standartTreeRow,
.dhxtree_dhx_skyblue .standartTreeRow_lor{
font-size:12px !important; /increased from 11/
line-height:15px; /inserted, smaller was better, as larger cut into item above/

.dhxtree_dhx_skyblue .selectedTreeRow_lor,
.dhxtree_dhx_skyblue .selectedTreeRow{
line-height:18px; /increased from 17/
font-size:12px !important; /increased from 11/[/code]

I think got it. I increased the height on various selectedTreeRow and standartTreeRow items to match the font-size increase shown in the code above (and removed my inserted line-height:15px;). Now the the text shows in the larger font-size without cutting off the descender characters (g, j, p, q, y).