BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
Hi,
I am using hot-tracking,
Is there a way to ignore this setting on certain nodes?
I am looking for an e.cancel=true
but they seem didn't work in nodebeforepaint. (e.handled=true overrides everything)
Is there a way to achieve this?
A temporary solution I came up with is to repaint the background but I am not sure what brushinfo settings to repaint exactly like that.
Ex: n.Background = New BrushInfo(BackwardDiagonal, Color.Red, Color.Yellow) (how to redraw this color in Nodebeforepaint)
Thanks you!
jamin.
private void TreeViewAdv1_BeforeNodePaint(object sender, TreeNodeAdvPaintEventArgs e) { if(e.Node.Text == "Parent1") { e.HotTracked = false; e.ForeColor = Color.Black; } } |
Hi Sweatha,
I tried but the node background color is still overwritten by the hot-track color.
Is there a way to handled-background? (currently I see it is ignoring text highlight)
Thank you!
jamin
Hi Sweatha,
I have attached a demo and description file.
Thanks you,
jamin.
Hi jamin ,
We have reviewed the sample you provided. As we suspected, the style you are using for the TreeViewAdv in your sample is causing the background to be applied to the hovered node. To prevent this, you can disable the background on hover by using the NodeBackgroundPaint event. In this event, you can handle the background for specific nodes.
We have modified the sample you provided accordingly. Please review it and let us know if you have any concerns.
private void TreeViewAdv1_NodeBackgroundPaint(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvPaintBackgroundEventArgs e) { if(e.Node.Text == "Node3") { e.Handled = true; } } |