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

x
?
Solved

help in Tree view

Posted on 2004-09-04
5
Medium Priority
?
249 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 80 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

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

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 …
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 response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

885 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