System.Windows.Forms.TreeView.ImageList Property

Gets or sets the System.Windows.Forms.ImageList that contains the System.Drawing.Image objects that are used by the tree nodes.

Syntax

[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)]
public ImageList ImageList { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If the System.Windows.Forms.ImageList property value is anything other than null, all the tree nodes display the first System.Drawing.Image stored in the System.Windows.Forms.ImageList. You can specify which images from the list are displayed for selected and unselected nodes by setting the TreeView.ImageIndex and TreeView.SelectedImageIndex properties. Individual System.Windows.Forms.TreeNode objects can specify which image is displayed by setting their TreeNode.ImageIndex and TreeNode.SelectedImageIndex properties. These individual settings will override the settings in the corresponding System.Windows.Forms.TreeView properties.

Note:

In the .NET Framework version 1.1, there is an issue that prevents images from appearing on System.Windows.Forms.TreeView nodes when your application calls Application.EnableVisualStyles. To work around this issue, call Application.DoEvents in your Main method immediately after you call Application.EnableVisualStyles. This issue is fixed in the dnprdnlong.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0