Forum /
Sencha GXT Community Forums (3.x) /
Sencha GXT Q&A /
Answered: Changing color of nodes text in tree for GXT3
Answered: Changing color of nodes text in tree for GXT3
Hello
I try to change color of tree node text in GXT3, In GXT2 version, I can change color using span tag (<span style='color: red'> " + item +"</span>, but this way can not apply in GXT3
node.JPG
is there a way to solve this?
thanks
ofang
Best Answer Posted by
sven
You need to use SafeHtml and do not escape it. Else it will be shown as in your picture. How does your code look like right now?
You need to use SafeHtml and do not escape it. Else it will be shown as in your picture. How does your code look like right now?
Thanks for your reply
But i can't fix this problem in spite of using safeHtml. here is my code and picture
node2.JPG
TreeStore<BaseDto> store = new TreeStore<BaseDto>(new KeyProvider());
Tree<BaseDto, SafeHtml> tree = new Tree<BaseDto, SafeHtml>(store, new ValueProvider<BaseDto, SafeHtml>() {
......
BaseDto m = createModel(SafeHtmlUtils.fromTrustedString("<span style='color:red'>Fast Tree</span>"));
store.add(m);
....
thanks
But i can't fix this problem in spite of using SafeHtml. here my code and picture.
node2.JPG
TreeStore<BaseDto> store = new TreeStore<BaseDto>(new KeyProvider());
final Tree<BaseDto, SafeHtml> tree = new Tree<BaseDto, SafeHtml>(store, new ValueProvider<BaseDto, SafeHtml>() {
...............
BaseDto m = createModel(SafeHtmlUtils.fromTrustedString("<span style='color:red'>Fast Tree</span>"));
store.add(m);
.................
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us