Solved

TreeView changing text color problem

Posted on 2006-10-27
2
317 Views
Last Modified: 2008-03-06
I have a treeview and I cant seem to change the forecolor on a nodes text.

The weird thing is that I can change the backcolor and that works fine. Any ideas?

'This Does works
Me.tvStatute.BeginUpdate()
Me.tvStatute.SelectedNode.BackColor = Color.Orange
Me.tvStatute.EndUpdate()

'This Doesn't work at all
Me.tvStatute.BeginUpdate()
Me.tvStatute.SelectedNode.ForeColor = Color.Orange
Me.tvStatute.EndUpdate()

Why would changing the backcolor work, but changing the forecolor not work?
Thanks,
0
Comment
Question by:bertino12
2 Comments
 
LVL 10

Accepted Solution

by:
gangwisch earned 250 total points
ID: 17820498
this worked:
Private Sub TreeView1_BeforeSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeView1.BeforeSelect
        e.Node.ForeColor = Color.AliceBlue
    End Sub
0
 

Author Comment

by:bertino12
ID: 17835450
Yes, thats a bit different than the way I did mine though. That does work, but for me the way I showed above works for backcolor, but not forecolor.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Setting runtime form location 4 31
update textboxes with Streamreader 21 42
Visual Studio .Net 2012 and Crystal Reports 9 48
Web Form VB.Net  import CSV 4 27
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now