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
Makes the file/folder the currently selected file/folder.
VB.NET | object.MakeCurrent() |
VB | object.MakeCurrent |
C#.NET | void object.MakeCurrent(); |
VC++ | HRESULT object->MakeCurrent(); |
C | HRESULT object->raw_MakeCurrent(); |
object
A SftDirectoryFolder object.
The MakeCurrent method makes the file/folder the currently selected file/folder.
The Folder.MakeVisible method can be used to make the file/folder visible using vertical scrolling if needed.
' 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 e.allow = False ' no need to open it End If End Sub Private Sub AxSftDirectoryRight_SelectionFinal(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftDirectoryRight.SelectionFinal UpdateRightButtons()
' 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 Allow = False ' no need to open it End If End Sub Private Sub SftDirectoryRight_SelectionFinal() UpdateRightButtons
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 } } private void axSftDirectoryRight_SelectionFinal(object sender, System.EventArgs e) { UpdateRightButtons();
ISftDirectoryPtr vDirLeft = m_DirLeft.GetControlUnknown(); // Move up on level in left side tree control ISftDirectoryFolderPtr f; f = vDirLeft->CurrentFolder; if (f != NULL) { f = f->Parent; if (f != NULL) { f->MakeCurrent(); // make it the current item f->MakeVisible(); // make sure it's scrolled into view } } } void CSimpleExplorerDlg::OnPropButton() {
See Also SftDirectoryFolder Object | Object Hierarchy