Solved

TreeView changing text color problem

Posted on 2006-10-27
2
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

623 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