You use the setTextDataprovider() for this. So instead of the normal dataprovider you can use the (unstored) calc for the HTML styled version of some stored text dataprovider.
I got it to work, it’s a bit tricky, as I have domain (menu) names (id < 100) and “normal” menu names where I want to differentiate the font color and there occured racing problems if 2 switch statements are used for font and names. So what I did for the bind.setFontTypeDataprovider() is a calc:
switch (globals.os)
{
...
case 'Mac OS X':
if (id < 100)
{
nodeName = "<html><p style = 'font-size: 11; color: #444f51; font-weight: bold'>" + name + "</p></html>";
}
else
{
nodeName = "<html><p style = 'font-size: 11; color: #1c2630; font-weight: regular'>" + name + "</p></html>";
}
break;
...
return nodeName;
and for the bind.setTextDataprovider():
switch (globals.os)
{
...
case 'Mac OS X':
nodeFont = 'LucidaGrande, 0, 11';
...;
return nodeFont;
I have to set for nodeFont the string ‘LucidaGrande, 0, 11’ incl. weight and size although it’s set in nodeName! But with the string ‘LucidaGrande’ alone it doesn’t work but would be enough as I set weight and size in the nodeName (HTML).
Now, 2 details remain with this solution. If not using HTML, somehow implicit the selected node font gets white which I also would like to have (better looking) and I don’t know how to set the selection background of the selected dn tree node (it’s too dark)
Any idea how to set this 2 properties? See attachment how it looks now.