Solved

VB 2008  - Unselect a branch in Treeview

Posted on 2009-07-12
3
392 Views
Last Modified: 2012-06-21
When the Treeview branch is clicked it's color changes.  (See attachment)  After it returns back to the Treeview the color remains unchanged.  How can I unselect that branch so the color disappears?
treeview.JPG
0
Comment
Question by:ljcor
3 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 400 total points
Comment Utility
You can use:

Me.TreeView1.SelectedNode = Nothing
0
 
LVL 85

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 100 total points
Comment Utility
You used the phrase...   "After it returns back to the TreeView"  ...which implies that the TreeView is getting Focus.  When it does get focus again a node will be selected automatically.

To prevent this you could use jpaulino's snippet in the GotFocus() event:

    Private Sub TreeView1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TreeView1.GotFocus
        TreeView1.SelectedNode = Nothing
    End Sub
0
 

Author Closing Comment

by:ljcor
Comment Utility
Two of the very best Experts helping this poor soul.  Thanks greatly!
Jack
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

10 Experts available now in Live!

Get 1:1 Help Now