property File.Ghosted as Boolean

Returns or sets a value that determines whether a file appears as unavailable (it appears dimmed).

TypeDescription
Boolean A boolean expression that indicates whether an item appears as unavailable.

Use the Ghosted property to change the item's appearance. Use the BackColor and ForeColor properties to change the background and foreground colors for a specified file/folder. Use the Get method to get the collection of files/folders. Use the Folder property to specify whether the File object hosts a file or a folder. Use the BrowseFolderPath property to specify the path to the browsed folder.

The following VB sample marks the tmp files:

With ExFileView1.Get(AllItems).Get("*.tmp")
    Dim i As Long
    For i = 0 To .Count - 1
        With .Item(i)
            .Ghosted = True
        End With
    Next
End With

The following C++ sample marks the tmp files:

CFiles files = m_fileview.GetGet( 1 /*AllItems*/ ).GetGet("*.tmp");
for ( long i = 0; i < files.GetCount(); i++ )
	files.GetItem( COleVariant( i ) ).SetGhosted( TRUE );

The following VB.NET sample marks the tmp files:

With AxExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.AllItems).Get("*.tmp")
    Dim i As Integer
    For i = 0 To .Count - 1
        .Item(i).Ghosted = True
    Next
End With

The following C# sample marks the tmp files:

EXFILEVIEWLib.Files files = axExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.AllItems).get_Get("*.tmp");
for (int i = 0; i < files.Count; i++)
	files[i].Ghosted = true;

The following VFP sample marks the tmp files:

With thisform.ExFileView1.Get( 1 ).Get("*.tmp") && AllItems
	local i
	for i = 0 to .Count - 1
		with .Item(i)
			.Ghosted = .t.
		endwith
	next
EndWith