Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TreeView changing text color problem

Posted on 2006-10-27
2
Medium Priority
?
357 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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses

876 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