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.  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: 

Gantt1.Items.SelectItem(Gantt1.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_gantt.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 AxGantt1.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 = axGantt1.Items.get_FindPath("Files and Folders\\Hidden Files and Folders\\Do not show hidden files and folder");
if ( iFind != 0 )
	axGantt1.Items.set_SelectItem(iFind, true);

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

with thisform.Gantt1.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