TreeListOptionsView.RowImagesShowMode Property

Gets or sets whether to show row images in row indents or in row cells.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v20.1.dll

Declaration

[DefaultValue(RowImagesShowMode.Default)]
[XtraSerializableProperty]
public virtual RowImagesShowMode RowImagesShowMode { get; set; }
<DefaultValue(RowImagesShowMode.Default)>
<XtraSerializableProperty>
Public Overridable Property RowImagesShowMode As RowImagesShowMode

Property Value

Type Default Description
DevExpress.XtraTreeList.RowImagesShowMode

Default

Default or InIndent to display row images in the indent area; InCell to display row images in row cells.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to RowImagesShowMode
WinForms Controls GanttControl
.OptionsView.RowImagesShowMode
GanttControl
.OptionsView.RowImagesShowMode
ResourcesTree
.OptionsView.RowImagesShowMode
TreeList
.OptionsView.RowImagesShowMode
Reporting XRDesignFieldList
.OptionsView.RowImagesShowMode
XRDesignFieldList
.OptionsView.RowImagesShowMode
XRDesignReportExplorer
.OptionsView.RowImagesShowMode
XRDesignReportExplorer
.OptionsView.RowImagesShowMode

Remarks

Nodes can display the following icons:

  • Select Image - two icons that automatically switch when a node gets / loses the focus.
  • State Image - any custom icon.

veNodeImage

Node Image Location

The TreeList.OptionsView.RowImagesShowMode property specifies where to display node images:

  • InIndent — images are displayed in the indent area.

    TreeListRowImages_InIndent

  • InCell — images are displayed in the cells.

    TreeListRowImages_InCell

Examples

The code below shows how to assign select and state images to nodes.

using DevExpress.XtraTreeList.Nodes;

// Data source for select (left) images.
treeList1.SelectImageList = imageCollection1;
// Use the data source to assign select images to nodes.
// Data source fields do NOT allow you to specify
// two images that depend on the focus.
// This property has priority over the node's
// ImageIndex and SelectImageIndex properties.
treeList1.ImageIndexFieldName = "ImageIndex";
// Data source for state (right) images.
treeList1.StateImageList = imageCollection1;
// Use the Load event to assign images to nodes.
treeList1.Load += TreeList1_Load;

private void TreeList1_Load(object sender, EventArgs e) {
    foreach (TreeListNode node in treeList1.Nodes) {
        // The left image displayed when the node is NOT focused.
        node.ImageIndex = 0;
        // The left image displayed when the node is focused.
        node.SelectImageIndex = 1;
        // The right image that does not depend on the focus.
        node.StateImageIndex = 2;
    }
}
See Also