How to set the TreeView node fore color in c#? -
in project have set fore color treeview node bluish which node have children nodes nodes in bluish color,remaining nodes having default color,here uncertainty in event write code setting fore color treeview nodes.
regards krishna
treeview.node has forecolor , backcolor property, looking for? this:
treeview tv = new treeview(); tv.nodes.add("node1", "node 1"); tv.nodes.add("node2", "node 2"); tv.nodes["node1"].forecolor = system.drawing.color.blue; tv.nodes["node2"].forecolor = system.drawing.color.black;
to check kid nodes of particular node:
node.forecolor = node.nodes.count > 0 ? system.drawing.color.blue : system.drawing.color.black;
c# treeview
No comments:
Post a Comment