Solved

help in Tree view

Posted on 2004-09-04
5
208 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

778 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