Поделиться через


DisplayName Property (SelectionEventArgs)

Topic Last Modified: 2006-11-30

The display name of the selected folder. The DisplayName property applies to the SelectionEventArgs Class.

Syntax

Property DisplayName As String
string DisplayName

Remarks

This property is read-only.

Example

The following Visual Basic .NET example shows a Selection Event handler function that displays the display name of the selected folder.

Private Sub OnSelection(ByVal o As Object, ByVal e As EventArgs) Handles treeView.Selection

     ' Declare the SelectionEventArgs object.
     Dim evtArgs As SelectionEventArgs

     ' Cast e to a SelectionEventArgs object.
     evtArgs = CType(e, SelectionEventArgs)

     Debug.WriteLine("Selected folder display name: " + evtArgs.DisplayName)

End Sub

The following C# example shows a Selection Event handler function that displays the display name of the selected folder.

void OnSelection(object o, EventArgs e )
{
     // Cast e to a SelectionEventArgs object.
     SelectionEventArgs evtArgs = (SelectionEventArgs)e;

     Debug.WriteLine("Selected folder display name: " + evtArgs.DisplayName);
}