Is there a way to display the text node's background all the way to right edge of the wintree control?
UltraTreeNode.Override.NodeAppearance.BackColor and UltraTreeNode.Override.NodeAppearance.ForeColor aren't working
These two lines code aren't working for me. But UltraTreeNode.Override.ActiveNodeAppearance.ForeColor and UltraTreeNode.Override.ActiveNodeAppearance.BackColor work. But i want to change the backcolor or forecolor of a node when a particular condition is met but all other nodes on the same level that don't meet the condition keep their default forecolor and background color.
Hi,
FullRowSelect only works in the standard ViewStyle. So once you have a band that's displaying in a grid style, it will not work.
There's no built-in way to do this with a grid-style band in the tree. You might want to consider using a different style, like OutlookExpress. This would require you to set up your ColumnSets for the first two levels manually, though, so it's a bit more work.
You would have to place the text of the first two bands into one of the columns.
I have attached a small sample project here to demonstrate what I mean.
Following is the code I used and I've also attached the screenshot. As you can see, both background colors for "Reminders" and "Due Now" text node are not expanded to the right of the control.
orderadapter.Fill(ds,
"Orders");
ultraTree1.FullRowSelect =
true;
ultraTree1.ShowLines =
false;
node1.Override.NodeAppearance.BackColor =
Color.DarkRed;
node1.Override.NodeAppearance.ForeColor =
Color.White;
node11.Override.NodeAppearance.BackColor =
Color.DarkSalmon;
node11.Nodes.SetDataBinding(ds,
ultraTree1.ExpandAll(
ExpandAllType.OnlyNodesWithChildren);
The code I posted above makes the nodes in the tree fill the entire horizontal space. This is the same way it works in the inbox Tree control.
If it's not what you want, then you can post a screen shot by going to the Options tab and attaching an image file like a jpg.