.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

change the color of tree node

Posted By: Ajesh Rawat     Posted Date: March 24, 2010    Points:2   Category :Windows Application
i have one text box
if we seach some text .
then how can i changed the search tree node font color(tree view)

Responses
Author: Lalij Mer             
Posted Date: March 25, 2010     Points: 5   

You can try this code sample

if ((aNode.ImageIndex == 1) || (aNode.ImageIndex == 0))
{
aNode.BackColor = Color.DarkBlue;
aNode.ForeColor = Color.White;
if ((OldNode != null) && (OldNode != aNode))
{
OldNode.BackColor = OriginalNode.BackColor;
OldNode.ForeColor = OriginalNode.ForeColor;
}
OldNode = aNode;
}
}
}
protected void treeView1_DragEnter (object sender, System.WinForms.DragEventArgs e)
{
e.Effect = CurrentEffect;
}


Reference link
http://www.c-sharpcorner.com/UploadFile/mgold/DoingDragandDropUsingCSharp11302005020610AM/DoingDragandDropUsingCSharp.aspx

Please Check my answer if you help....
Thank You...

Lalit.
Author: Sagar Pardeshi             
Posted Date: March 26, 2010     Points: 5   


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend