Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

SftDirectoryFolder.MakeVisible Method

Makes the file/folder visible using vertical scrolling if needed.

Syntax

VB.NETobject.MakeVisible()
VBobject.MakeVisible
C#.NETvoid object.MakeVisible();
VC++HRESULT object->MakeVisible();
CHRESULT object->raw_MakeVisible();

object

A SftDirectoryFolder object.

Comments

The MakeVisible method makes the file/folder visible using vertical scrolling if needed.

The Folder.MakeCurrent method can be used to make the file/folder the currently selected file/folder.

Examples

VB.NET

    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()
    If Not AxSftDirectoryRight.CurrentFolder Is Nothing Then

VB6

    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
End Sub

C#

    // 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();
    if (axSftDirectoryRight.CurrentFolder != null)

C++

    // 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()
{
    ISftDirectoryPtr vDirRight = m_DirRight.GetControlUnknown();

See Also SftDirectoryFolder Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.