Solved

help in Tree view

Posted on 2004-09-04
5
221 Views
Last Modified: 2010-04-23
I have treeview with the nodes like this

HTML
-- Green
----Pink
FLash
--Brown

I want that the user clicks on Green the image of green will come in picture box. I hvae seperate image stored on my  folder
when the suer clicks on brown the brown image will come in picture box

I  am making in VB.NET
pls let me know how will i show this
0
Comment
Question by:rajender123
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Javert93
ID: 11981388
Is this a windows forms application, or an ASP.NET application?
0
 

Author Comment

by:rajender123
ID: 11987116
Hi!!!
Its the windos form application...
do let me know hwo will i do it

0
 
LVL 4

Accepted Solution

by:
Javert93 earned 20 total points
ID: 12008400
Use the AfterSelect event to determine when a node is selected. Here is an example:

    Private Sub TreeView1_AfterSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect
        Select Case e.Node.Text
            Case "Green"
                ' TODO: Load the green image here
            Case "Pink"
                ' TODO: Load the pink image here
            Case "Brown"
                ' TODO: Load the brown image here
        End Select
    End Sub
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

713 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