We have used a wintree control in our application and have added an App stylist for settings the stylist for various controls.We are showing multiple columns in the tree and have set the view style to OutLookExpress.
Through the code i am able to set the first record (root node record)as the active node (ultratree.ActiveNode = ultratree.Nodes[0]).
I need to set the backcolor for the activenode.
In the appstylist, i edited the Wintree "TreeNode" settings to set the color, but this is not getting applied after i save the changes and run the application.Please refer the attached screen shots for more info.
Any suggestions on how to set the backcolor of an Active node for a wintree using app stylist?
Thanks,
Narasimha
Hi Narasimha,
It's very hard to guess why this isn't working without more information.
Exactly what UI Role and what state are you applying the color to?
The tree has a default appearance for the active node, so the fact that your screen shot does not even show that seems to indicate that your code is doing something to explicitly turn this off.
Hi Mike,
I have the color for the TreeNode. I have tried by setting the Resources for various options: Noraml, Selected, Active etc.
Regarding the default appearance, when i click on the node the back color changes to bule, which i guess is the default setting. But the same does not happen on screen load, where i am expanding the root node after binding the data. Then explicitly setting the root node as the active node.
Will attach the screen shot of the app setting that i have modified, hopefully this will be of some help.
Mike,
Assuming i have gone about setting the app stylist in the wrong manner, can you give me the steps that i need to take for setting the back color an Active node in App stylist?
I want to override the default settings with custom settings.
I opened up AppStylist and started a new style library and went to the Navigation tab to try this out. The Canvas Options allow you to change the style of the tree, so I changed it to OutlookExpress so it matches what you are doing.
From the screen shot you have here, I can see that you are using the TreeNode UIRole for the Active state, which makes sense.
I find that if I set a background color on this role, it works fine. But that's not what you are doing. Your screen shot shows that you are using a resource. So I tried this out using a resource with a background color on it, and once again, it works fine.
My guess is that the resource you are using here doesn't have any colors applied to it. It's probably using a background image. If I apply a background image to this role, either directly or via a resource, it does not work. Not every role supports every appearance property and it looks like the tree node does not support a background image. This is probably because the image would end up repeating every cell rather than displaying across the whole node.
So you will probably need to use the background colors to get the effect you want.
Hi,
Let me know if you need any additional help.
Regards,
Stefaniya
I have created the following support ticket for you: CAS-52574-Z4FPJB. Please send me there what you have achieved up to now, so I can research it further and provide you accurate suggestions based on your scenario.
hi Stefaniya,
If you can help me with setting the background color for the selected row (node) in the tree using the "Resource" property instead of "Background" it will be helpful.
currently the color which i have set using the background property is more a close match to the color for active row in a win grid which is set by selecting a Resource.
If i can do the same for the wintree it will be great, keep the settings uniform irrespective of control.
Let me know if you need my assistance.
As Mike has mentioned, using the different ui roles works. I have uploaded a sample with modified version of Office2007Blue.isl. I have modified the active appearance for the following UI Roles: Cell->TreeCell and TreeNode. If you want, you can upload a small sample of what you have achieved with the appStylist, and will research for you why the resources are not applied over the tree’s nodes.
Let me know your decision.
I am now able to set the setting by setting the background color but not able to do so using the resource. So the color i have choosen is more a close match to the resource settings used for a highlighting active row in a grid and not the same.... For the tree view in Outlookexpress style when i set the resource the preview button does not change as it does when i set the background color for the active node(row)
Mark ,
Thanks for your reply, i actually reset all the settings and started fresh by just setting the background color just the way you did and mentioned in your post.