-
1. Re: how to change color of tree connector lines?
fmarwede Feb 11, 2009 9:55 AM (in response to mazz)I'm interested in this topic, too. I remember that this question already appeared last year but I can't find it...in my opinion at the moment your only chance is to change the skin.
But there are so many css classes for customizing the look of the tree component that I'm not sure.
Is anyone out there who has already accomplished this task? -
2. Re: how to change color of tree connector lines?
mazz Feb 11, 2009 12:53 PM (in response to mazz)Maybe I could submit an enhancement JIRA? I really think the default color here is not appropriate - it should be darker by default so you can see it more easily.
-
3. Re: how to change color of tree connector lines?
fmarwede Feb 11, 2009 3:35 PM (in response to mazz)Why not? Post the link here, i will vote for it.
-
5. Re: how to change color of tree connector lines?
nbelaevski Feb 11, 2009 6:37 PM (in response to mazz)You can change it using rich-* classes.
-
6. Re: how to change color of tree connector lines?
fmarwede Feb 11, 2009 7:08 PM (in response to mazz)But which one? rich-tree-node-icon? Just a guess... and which CSS value? Sorry, maybe a stupid question.
-
7. Re: how to change color of tree connector lines?
mazz Feb 11, 2009 8:18 PM (in response to mazz)Oooo, are you saying this CAN be done by just using our own CSS styles/classes? Would you by any chance be able to provide a small example here?
-
8. Re: how to change color of tree connector lines?
mazz Feb 12, 2009 1:01 PM (in response to mazz)I don't think this can be done.
.dr-tree-h-ic-img { foreground-color: #000000 } .dr-tree-h-ic-img-md { foreground-color: #000000 }
I know those are the CSS styles for the line images because if I change "foreground-color" to "background-color", I can see move of the line images turn to a black background.
No, I think what the problem is is that these lines are actual images, either static or dynamically generated (I don't know which). So, we'd have to provide overrides to the images in order to get their colors to change. -
9. Re: how to change color of tree connector lines?
fmarwede Feb 12, 2009 2:19 PM (in response to mazz)Is foreground-color a valid css value?? I think it has to be simply "color". But you are right: I tried to give all possible RF css classes another color but I failed. Something we are doing wrong...
-
10. Re: how to change color of tree connector lines?
nbelaevski Feb 12, 2009 6:02 PM (in response to mazz)I should say sorry guys. After investigation I've found out that there is no simple and manageable CSS solution allowing to change images for tree lines that will work in all supported browsers.
-
11. Re: how to change color of tree connector lines?
fmarwede Feb 12, 2009 6:40 PM (in response to mazz)No Problem, Nick. So at least the issue created by mazz is legitimate. I hope many users will vote for it and I also hope it'll cost not too much time for you RF guys to realize a solution ;-)
Is our guess correct that these lines are images? Static or dynamic generated? Would it be difficult to make them exchangeable? -
12. Re: how to change color of tree connector lines?
nbelaevski Feb 12, 2009 8:18 PM (in response to mazz)These lines are dynamically generated images. Line color is defined by trimColor skin parameter. Exchanging it is entirely possible - here is XCSS file containing all necessary selectors: http://fisheye.jboss.org/browse/RichFaces/trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss?r=10199,
however this won't work right in AJAX-expanded trees in IE 6/7 due to special code emulating unsupported CSS selectors containing hardcoded image URIs: http://fisheye.jboss.org/browse/RichFaces/trunk/ui/tree/src/main/templates/htmlTreeNode.jspx?r=12029 - lines 49-53. Changing image classes itself and rebuilding will be easier than patching tree component code and rebuilding it.