MuruganAD.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  DISCUSSION FORUM   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



VB .NET TreeNode Display Image or icon in a TreeView Control

Home    VB .NET    VB .NET TreeNode Display Image or icon in a TreeView Control

This is how you could add an icon or an image to the TreeNode of a Tree View Control.

1. Drag and drop an ImageList from the tool bar into the form. 
2. In the imagelist images property click on the collection and add images
3. In the TreeView Controls ImageList property select the Imagelist U have just added
3. You Could set the values for SelectedImageIndex or SelectImageKey which would display the image
when u click on a node. 


In code You could add
oTreeNode.ImageIndex = 0
or 
oTreeNode.ImageKey = "folder.jpg"

Where oTreeNode is an instance of TreeNode 





  |  HOME   |  BLOG   |  DISCUSSION FORUM   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam