This document is archived and information here might be outdated.  Recommended version.


IDisplayExpressionProperties Interface (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Carto)  

IDisplayExpressionProperties Interface

Provides access to the properties for generating a display string.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Members

Description
Read/write property Expression The VBScript or JScript expression that evaluates and formats the label.
Read/write property ExpressionParser The object that interprets the expression.
Read/write property IsExpressionSimple Indicates if the expression is simple.

CoClasses that implement IDisplayExpressionProperties

CoClasses and Classes Description
DisplayExpressionProperties Maintains the properties for generating a display string.

Remarks

The display expression allows you to provide a VBScript or JScript expression to use as the display field within ArcMap rather than just a single field. This is usefull if you want to display a map tip as a concatontation or a function of several fields. The value of the resulting display expression is also displayed in the identify and attribute windows if set.

The display expression formula is set via the Expression method on this interface. The resulting display expresion can be quieried for a feature via the IDisplayString.FindDisplayString method.

Note that if you set the display field of a layer to a single field via IFeatureLayer.DisplayField that will fail if a display expression is set. You will need to clear the display expression first by setting the expression to an empty string.

[Visual Basic .NET]
Dim pMxDoc As IMxDocument
Dim pFLayer As IFeatureLayer
Dim pDEP As IDisplayExpressionProperties
Dim pIDS As IDisplayString
Set pMxDoc=ThisDocument
Set pFLayer=pMxDoc.SelectedLayer
Set pIDS=pFLayer
Set pDEP=pIDS.ExpressionProperties