Solved

TreeView changing text color problem

Posted on 2006-10-27
2
308 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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 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

14 Experts available now in Live!

Get 1:1 Help Now