property File.Checked as Boolean
Specifies whether the file is checked or unchecked.

 TypeDescription 
   Boolean A boolean expression that indicates whether a file or folder is checked or unchecked.   
Use the Checked property to determine whether a file is checked or unchecked. Use the HasCheckBox property to assign a check box for each item in your control. Use the Get method  to get the collection of checked items like shown in the following samples. Use the Folder property to specify whether a File object holds a file or a folder. Use the Name property to get the name of the file or folder. Use the BrowseFolderPath property to specify the path to the browsed folder.

The following VB sample displays the checked files and folders:

With ExFileView1.Get(CheckItems)
    Dim i As Long
    For i = 0 To .Count - 1
        With .Item(i)
            Debug.Print .Name
        End With
    Next
End With

The following VB sample checks the selected file, by code:

ExFileView1.Get(SelItems)(0).Checked = True

The following C++ sample displays the checked files and folders:

CFiles files = m_fileview.GetGet( 2 /*CheckItems*/ );
for ( long i = 0; i < files.GetCount(); i++ )
	OutputDebugString( files.GetItem( COleVariant( i ) ).GetName() );

The following VB.NET sample displays the checked files and folders:

With AxExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.CheckItems)
    Dim i As Integer
    For i = 0 To .Count - 1
        Debug.WriteLine(.Item(i).Name)
    Next
End With

The following C# sample displays the checked files and folders:

EXFILEVIEWLib.Files files = axExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.CheckItems);
for (int i = 0; i < files.Count; i++)
	System.Diagnostics.Debug.WriteLine( files[i].Name );

The following VFP sample displays the checked files and folders:

With thisform.ExFileView1.Get( 2 ) && CheckItems
	local i
	for i = 0 to .Count - 1
		with .Item(i)
			wait window nowait .Name
		endwith
	next
EndWith

 


Send comments on this topic.
1999-2016 Exontrol.COM, Software. All rights reserved.