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
Defines the file/folder's full path.
Get
| VB.NET | String = object.Path As String |
| VB | String = object.Path As String |
| C#.NET | string String = object.Path; |
| VC++ | _bstr_t String = object->Path; _bstr_t String = object->GetPath(); |
| C | HRESULT object->get_Path(BSTR* String); |
object
A SftDirectoryFolder object.
String
Defines the file/folder's full path.
The Path property defines the file/folder's full path.
The file/folder's name can be retrieved using the Name property.
Certain folders, such as "My Computer" and "My Network Places", etc., return an empty string as the Path property. These are "virtual" folders, which do not physically exist.
AxSftDirectory1.get_ColumnEntry(0).HeaderText = "Folder"
AxSftDirectory1.get_ColumnEntry(1).HeaderText = "Full Path"
AxSftDirectory1.get_ColumnEntry(1).Contents = SftDirectoryContentsConstants.contentsSftDirectoryUser1
AxSftDirectory1.Reload(False, False)
End Sub
Private Sub AxSftDirectory1_UserContents(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_UserContentsEvent) Handles AxSftDirectory1.UserContents
If e.contents = SftDirectoryContentsConstants.contentsSftDirectoryUser1 Then
e.userString = e.folder.Path
End If
End Sub
SftDirectory1.ColumnEntry(0).HeaderText = "Folder"
SftDirectory1.ColumnEntry(1).HeaderText = "Full Path"
SftDirectory1.ColumnEntry(1).Contents = contentsSftDirectoryUser1
SftDirectory1.Reload False, False
End Sub
Private Sub SftDirectory1_UserContents(ByVal Folder As SftDirectoryLib30.ISftDirectoryFolder, ByVal Contents As SftDirectoryLib30.SftDirectoryContentsConstants, UserString As String)
If Contents = contentsSftDirectoryUser1 Then
UserString = Folder.Path
End If
End Sub
axSftDirectory1.get_ColumnEntry(1).HeaderText = "Full Path";
axSftDirectory1.get_ColumnEntry(1).Contents = SftDirectoryContentsConstants.contentsSftDirectoryUser1;
axSftDirectory1.Reload(false, false);
}
private void axSftDirectory1_UserContents(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_UserContentsEvent e)
{
if (e.contents == SftDirectoryContentsConstants.contentsSftDirectoryUser1) {
e.userString = e.folder.Path;
}
}
return TRUE; // return TRUE unless you set the focus to a control
}
void CUserContentsDlg::OnUserContentsSftDirectory1(LPDISPATCH Folder, long Contents, BSTR FAR* UserString)
{
ISftDirectoryFolderPtr pFolder = Folder;
if (Contents == contentsSftDirectoryUser1) {
*UserString = SysAllocString(pFolder->Path);
}
}See Also SftDirectoryFolder Object | Object Hierarchy
