Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

SftDirectory.Clear Method

Empties the control.

Syntax

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

object

A SftDirectory object.

Comments

The Clear method empties the control.

All folders are removed from the control (they are not physically deleted).

The control contents can be loaded using the Reload method.

Examples

VB.NET

    UpdateLeftButtons()
    UpdateRightButtons()
    AxSftDirectoryRight.MakeColumnsOptimal()
End Sub

Private Sub AxSftDirectoryLeft_SelectionFinal(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftDirectoryLeft.SelectionFinal
    ' If the selection in the left tree changes, update right side detaillist
    UpdateLeftButtons()
    AxSftDirectoryRight.Clear()
    AxSftDirectoryRight.CancelMode()
    AxSftDirectoryRight.Refresh()
    If Not AxSftDirectoryLeft.CurrentFolder Is Nothing Then
        AxSftDirectoryRight.TopMostFolderIDL = AxSftDirectoryLeft.CurrentFolder.ItemIDList
    Else
        AxSftDirectoryRight.TopMostFolderSpecial = SftDirectorySpecialFolderConstants.specialSftDirectoryEmpty
    End If

VB6

    UpdateLeftButtons
    UpdateRightButtons
    SftDirectoryRight.MakeColumnsOptimal
End Sub

Private Sub SftDirectoryLeft_SelectionFinal()
    ' If the selection in the left tree changes, update right side detaillist
    UpdateLeftButtons
    SftDirectoryRight.Clear
    SftDirectoryRight.CancelMode
    SftDirectoryRight.Refresh
    If Not SftDirectoryLeft.CurrentFolder Is Nothing Then
        SftDirectoryRight.TopMostFolderIDL = SftDirectoryLeft.CurrentFolder.ItemIDList
    Else
        SftDirectoryRight.TopMostFolderSpecial = specialSftDirectoryEmpty
    End If

C#

        if (f.Can("NewFolder"))
            buttonNewFolder.Enabled = true;
    }
}

private void axSftDirectoryLeft_SelectionFinal(object sender, System.EventArgs e) {
    // If the selection in the left tree changes, update right side detaillist
    UpdateLeftButtons();
    axSftDirectoryRight.Clear();
    axSftDirectoryRight.CancelMode();
    axSftDirectoryRight.Refresh();
    if (axSftDirectoryLeft.CurrentFolder != null)
        axSftDirectoryRight.TopMostFolderIDL = axSftDirectoryLeft.CurrentFolder.ItemIDList;
    else
        axSftDirectoryRight.TopMostFolderSpecial = SftDirectorySpecialFolderConstants.specialSftDirectoryEmpty;
}

C++

}

void CSimpleExplorerDlg::OnSelectionFinal_SftDirectoryLeft()
{
    ISftDirectoryPtr vDirRight = m_DirRight.GetControlUnknown();
    ISftDirectoryPtr vDirLeft = m_DirLeft.GetControlUnknown();

    UpdateLeftButtons();
    vDirRight->Clear();
    vDirRight->CancelMode();
    vDirRight->Refresh();
    if (vDirLeft->CurrentFolder != NULL)
        vDirRight->TopMostFolderIDL = vDirLeft->CurrentFolder->ItemIDList;
    else
        vDirRight->TopMostFolderSpecial = specialSftDirectoryEmpty;
}

See Also SftDirectory Object | Object Hierarchy


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