tags:

views:

113

answers:

1

Hello All,

I need to be able to change the color of a node in a treepanel. I thought this would be pretty simple, but i am having a heck of a time finding anything.

Thanks

+1  A: 

of course, 5 minutes after I ask, I find the solution....

It does work without removing the current class, but I left the line there just because I don't know if it might cause problems later if its not there.

<style>
.RedText a span
{
color: Red;
}
</style>

var currentClass = opNode.attributes.cls;
opNode.ui.removeClass(currentClass);
opNode.ui.addClass('RedText');
opNode.attributes.cls = 'RedText';
Limey