property Items.FindPath (Path as String) as HITEM

Finds an item given its path.

TypeDescription
Path as String A string expression that indicates the item's path.
HITEM A long expression that indicates the item's handle that matches the criteria.

The FindPath property searches the item on the column SearchColumnIndex.  The searching is case sensitive only if the ASCIIUpper property is empty. Use the FullPath property in order to get the item's path. Use the FindItem to search for an item. 

The following VB sample selects the item based on its path: 

Tree1.Items.SelectItem(Tree1.Items.FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder")) = True

The following C++ sample selects the item based on its path:

#include "Items.h"
CItems items = m_tree.GetItems();
COleVariant vtMissing;
long hFind = items.GetFindPath( "Files and Folders\\Hidden Files and Folders\\Do not show hidden files and folder" );
if ( hFind != NULL )
	items.SetSelectItem( hFind, TRUE );

The following VB.NET sample selects the item based on its path:

With AxTree1.Items
    Dim iFind As Integer
    iFind = .FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder")
    If Not (iFind = 0) Then
        .SelectItem(iFind) = True
    End If
End With

The following C# sample selects the item based on its path:

int iFind = axTree1.Items.get_FindPath("Files and Folders\\Hidden Files and Folders\\Do not show hidden files and folder");
if ( iFind != 0 )
	axTree1.Items.set_SelectItem(iFind, true);

The following VFP sample selects the item based on its path:

with thisform.Tree1.Items
	.DefaultItem = .FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder")
	if ( .DefaultItem <> 0 )
		.SelectItem( 0 ) = .t.
	endif
endwith