VIBlend
// Client Login
Home Products Downloads Purchase Support Forum About


How to set an image to a TreeNode in VIBlend TreeView for WinForms? 


Article Information 

Article relates to VIBlend TreeView for WinForms 

How To 

Set an image to a TreeNode 

Solution 

In order to achieve this, you need to do the following: 

1. Drag and drop a new instance of the vTreeView control or create it programmatically. 

2. Create a new instance of the ImageList component and fill it with images by using its Images property. 

3. Add tree nodes by using the Add method of the TreeView Nodes collection. 

4. Create a new ImageList, add images to it and associate it to the vTreeView instance by using the ImageList property. 

5. Use the vTreeNode ImageIndex property in order to associate an image from the ImageList. In addition, you can use the SelectedImageIndex property that will set an image to the TreeNode when it is selected, or the StateImageIndex property that will set an image to the TreeNode when it is expanded. 

 



VIBlend Knowledge Base Home
Copyright © 2015 VIBlend  
ALL RIGHTS RESERVED  
 
Terms of Use | Privacy Policy
Silverlight Controls WinForms Controls Knowledge Base About Us
       
Silvelright DataGrid Ribbon Interface Technical Support Blog
Silverlight Editors WinForms DataGrid
Silverlight Ribbon Bar Calendar Downloads Forum
Navigation Bars Navigation Bars    
Menu & ContextMenu TreeView Purchase Online Client Login
ComboBox & ListBox Tab Control    
Silverlight Pivot Table WinForms Pivot Grid Request a feature Report a bug