Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

SftDirectory.CancelMode Method

Cancels current processing modes.

Syntax

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

object

A SftDirectory object.

Comments

The CancelMode method cancels current processing modes.

Applications may wish to respond to events such as the MouseDown event. Many mouse related events may have built-in functions, particularly drag & drop operations may be started after these events are processed. If an application wants to suppress the built-in behavior, e.g. to display a context menu, the internal state of the control has to be cleared. This can be accomplished using the CancelMode method.

Examples

VB.NET

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

VB6

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

C#

            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;
}

void CSimpleExplorerDlg::OnOpening_SftDirectoryRight(LPDISPATCH FAR* Folder, BOOL FAR* Allow)

See Also SftDirectory Object | Object Hierarchy


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