SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Returns a SftDirectoryFolder object given a file/folder's absolute IDL.
Get
VB.NET | refFolderObj = object.get_FolderUsingIDL(ByVal absoluteIDL As String, ByVal FindOnly As Boolean) As SftDirectoryFolder |
VB | Set refFolderObj = object.FolderUsingIDL(ByVal absoluteIDL As String, ByVal FindOnly As Boolean) As SftDirectoryFolder |
C#.NET | SftDirectoryFolder refFolderObj = object.get_FolderUsingIDL(string absoluteIDL, bool FindOnly); |
VC++ | ISftDirectoryFolder* refFolderObj = object->FolderUsingIDL[_bstr_t absoluteIDL][VARIANT_BOOL FindOnly]; ISftDirectoryFolder* refFolderObj = object->GetFolderUsingIDL(_bstr_t absoluteIDL, VARIANT_BOOL FindOnly); |
C | HRESULT object->get_FolderUsingIDL(BSTR absoluteIDL, VARIANT_BOOL FindOnly, ISftDirectoryFolder** refFolderObj); |
object
absoluteIDL
A string value representing an ITEMIDLIST structure describing the absolute item ID of the folder to retrieve.
FindOnly
Defines whether the folder is located or added to the control.
FindOnly | Description |
---|---|
True | The folder absoluteIDL is located within the presently loaded files and folders. If the file/folder is not found, Nothing (NULL) is returned. |
False | If the specified file/folder absoluteIDL is not already present in the list, it is added to the control and all its parent folders are expanded. If the path is only partially valid, all valid initial folders are added and expanded. If the specified path is already present (even if part of a collapsed parent folder), its refFolderObj reference is returned. Parent folders are not expanded. |
refFolderObj
Returns a SftDirectoryFolder object given a file/folder's absolute IDL.
The FolderUsingIDL property returns a SftDirectoryFolder object given a file/folder's absolute IDL.
If the specified path described by absoluteIDL cannot be found, the return value is Nothing (NULL).
The root folder cannot be located using the FolderUsingIDL property.
ITEMIDLIST structures are typically used when communicating with the Windows Shell. For detailed information about the ITEMIDLIST structure and its use, please see Microsoft's Windows documentation.
The Folder property can be used to retrieve a SftDirectoryFolder object given a path name.
Dim IDL As String ' we're about to open a file/folder. If we can add the folder on the ' left side, that means we don't need to open it in a separate window IDL = e.folder.ItemIDList ' the folder we are looking for ' this will add the complete hierarchy down to the folder in ' left tree (if possible) On Error Resume Next F = AxSftDirectoryLeft.get_FolderUsingIDL(IDL, False) On Error GoTo 0 ' this will locate the exact item if we just added it F = AxSftDirectoryLeft.get_FolderUsingIDL(IDL, True) If Not F Is Nothing Then ' The folder has been added on the left side F.MakeCurrent() ' make it the current item F.MakeVisible() ' make sure it's scrolled into view
Dim IDL As String ' we're about to open a file/folder. If we can add the folder on the ' left side, that means we don't need to open it in a separate window IDL = Folder.ItemIDList ' the folder we are looking for ' this will add the complete hierarchy down to the folder in ' left tree (if possible) On Error Resume Next Set F = SftDirectoryLeft.FolderUsingIDL(IDL, False) On Error GoTo 0 ' this will locate the exact item if we just added it Set F = SftDirectoryLeft.FolderUsingIDL(IDL, True) If Not F Is Nothing Then ' The folder has been added on the left side F.MakeCurrent ' make it the current item F.MakeVisible ' make sure it's scrolled into view
SftDirectoryFolder f; String IDL; // we're about to open a file/folder. If we can add the folder on the // left side, that means we don't need to open it in a separate window IDL = e.folder.ItemIDList; // the folder we are looking for // this will add the complete hierarchy down to the folder in // left tree (if possible) f = axSftDirectoryLeft.get_FolderUsingIDL(IDL, false); // this will locate the exact item if we just added it f = axSftDirectoryLeft.get_FolderUsingIDL(IDL, true); if (f != null) { // The folder has been added on the left side f.MakeCurrent(); // make it the current item f.MakeVisible(); // make sure it's scrolled into view e.allow = false; // no need to open it
// we're about to open a file/folder. If we can add the folder on the // left side, that means we don't need to open it in a separate window bstrIDL = f->ItemIDList; // the folder we are looking for // this will add the complete hierarchy down to the folder in // left tree (if possible) ISftDirectoryFolderPtr FolderAdded; HRESULT hr = vDirLeft->get_FolderUsingIDL(bstrIDL, VARIANT_FALSE, &FolderAdded); // this will locate the exact item if we just added it ISftDirectoryFolderPtr FolderFound; hr = vDirLeft->get_FolderUsingIDL(bstrIDL, VARIANT_TRUE, &FolderFound); if (SUCCEEDED(hr) && FolderFound != NULL) { // The folder has been added on the left side FolderFound->MakeCurrent(); // make it the current item FolderFound->MakeVisible(); // make sure it's scrolled into view
See Also SftDirectory Object | Object Hierarchy