Hello community,
Does anybody know what is the best way to set a custom icon for root node in the tree component? Just for root node, other nodes must stay untouched. I can set icons for leafs programmatically, but what is about root node?
Thanks in advance.
[SOLVED] How to set other icon for tree root node?
Last edited by Oleg on 14 Jun 2010, 11:09, edited 1 time in total.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
Here is a CSS based solution if somebody needs it
Important is the class "ygtvdepth0".
Code: Select all
.ygtvdepth0 .ygtvtm,
.ygtvdepth0 .ygtvtmh {
background: url(../img/tmRoot.gif.jsf?ln=themes) 1px 0 no-repeat;
}
.ygtvdepth0 .ygtvtp,
.ygtvdepth0 .ygtvtph {
background: url(../img/tpRoot.gif.jsf?ln=themes) 1px 0 no-repeat;
}
.ygtvdepth0 .ygtvlm,
.ygtvdepth0 .ygtvlmh {
background: url(../img/lmRoot.gif.jsf?ln=themes) 1px 0 no-repeat;
}
.ygtvdepth0 .ygtvlp,
.ygtvdepth0 .ygtvlph {
background: url(../img/lpRoot.gif.jsf?ln=themes) 1px 0 no-repeat;
}
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Cool, thanks for sharing Oleg.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 53 guests