Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

SftDirectoryFolder.CheckBox Property

Defines the file/folder's checkbox status.

Syntax

Get

VB.NETValue = object.CheckBox As SftDirectoryCheckBoxValueConstants
VBValue = object.CheckBox As SftDirectoryCheckBoxValueConstants
C#.NETSftDirectoryCheckBoxValueConstants Value = object.CheckBox;
VC++enum SftDirectoryCheckBoxValueConstants Value = object->CheckBox;
enum SftDirectoryCheckBoxValueConstants Value = object->GetCheckBox();
CHRESULT object->get_CheckBox(enum SftDirectoryCheckBoxValueConstants* Value);

Put

VB.NETobject.CheckBox = Value As SftDirectoryCheckBoxValueConstants
VBobject.CheckBox = Value As SftDirectoryCheckBoxValueConstants
C#.NETSftDirectoryCheckBoxValueConstants object.CheckBox = Value;
VC++enum SftDirectoryCheckBoxValueConstants object->CheckBox = Value;
void object->PutCheckBox(enum SftDirectoryCheckBoxValueConstants Value);
CHRESULT object->put_CheckBox(enum SftDirectoryCheckBoxValueConstants Value);

object

A SftDirectoryFolder object.

Value

Defines the file/folder's checkbox status.

ValueValueDisplay without ThemesDisplay with ThemesDescription
checkboxSftDirectoryNone0None - The checkbox is removed.
checkboxSftDirectoryNo1Not selected - The checkbox option is enabled and not selected.
checkboxSftDirectoryYes2Selected - The checkbox option is enabled and selected.
checkboxSftDirectoryUnknown3Unknown - The checkbox option is enabled and unknown.
checkboxSftDirectoryNoDisabled4Not selected, disabled - The checkbox option is disabled and not selected.
checkboxSftDirectoryYesDisabled5Selected, disabled - The checkbox option is disabled and selected.
checkboxSftDirectoryUnknownDisabled6Unknown, disabled - The checkbox option is disabled and unknown.

Comments

The CheckBox property defines the file/folder's checkbox status.

Any checkbox can be clicked by the user, including disabled checkboxes. The CheckBoxClicked event occurs for all checkbox states.

Checkboxes are only displayed if the ShowCheckBoxes property is suitably defined.

The SetSubFolderCheckBoxes method can be used to update the checkboxes of all subfolders.

The folder's EvaluateSubFolderCheckBoxes method can be used to update its checkbox status based on its subfolders' checkboxes.

Examples

VB.NET

End Sub

Private Sub AxSftDirectoryTV_CheckBoxClicked(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_CheckBoxClickedEvent) Handles AxSftDirectoryTV.CheckBoxClicked
    If e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryNo And _
            e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes Then
        e.newValue = SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes
    End If
    AxSftDirectoryTV.CurrentFolder.SetSubFolderCheckBoxes(e.newValue, True)
    AxSftDirectoryTV.CurrentFolder.CheckBox = e.newValue
    AxSftDirectoryTV.RootFolder.EvaluateSubFolderCheckBoxes(True)
End Sub

Private Sub AxSftDirectoryTV_Combo_CheckBoxClicked(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_CheckBoxClickedEvent) Handles AxSftDirectoryTV_Combo.CheckBoxClicked
    If e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryNo And _
            e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes Then
        e.newValue = SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes

VB6

    SftDirectoryDL_Combo.Headers.Style = Style
End Sub

Private Sub SftDirectoryTV_CheckBoxClicked(ByVal Folder As SftDirectoryLib30.ISftDirectoryFolder, ByVal OldValue As SftDirectoryLib30.SftDirectoryCheckBoxValueConstants, NewValue As SftDirectoryLib30.SftDirectoryCheckBoxValueConstants)
    If NewValue <> checkboxSftDirectoryNo And NewValue <> checkboxSftDirectoryYes Then
        NewValue = checkboxSftDirectoryYes
    End If
    SftDirectoryTV.CurrentFolder.SetSubFolderCheckBoxes NewValue, True
    SftDirectoryTV.CurrentFolder.CheckBox = NewValue
    SftDirectoryTV.RootFolder.EvaluateSubFolderCheckBoxes True
End Sub

Private Sub SftDirectoryTV_Combo_CheckBoxClicked(ByVal Folder As SftDirectoryLib30.ISftDirectoryFolder, ByVal OldValue As SftDirectoryLib30.SftDirectoryCheckBoxValueConstants, NewValue As SftDirectoryLib30.SftDirectoryCheckBoxValueConstants)
    If NewValue <> checkboxSftDirectoryNo And NewValue <> checkboxSftDirectoryYes Then
        NewValue = checkboxSftDirectoryYes
    End If

C#

}

private void axSftDirectoryTV_CheckBoxClicked(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_CheckBoxClickedEvent e) {
    if (e.newValue != SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryNo &&
            e.newValue != SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes) {
        e.newValue = SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes;
    }
    axSftDirectoryTV.CurrentFolder.SetSubFolderCheckBoxes(e.newValue, true);
    axSftDirectoryTV.CurrentFolder.CheckBox = e.newValue;
    axSftDirectoryTV.RootFolder.EvaluateSubFolderCheckBoxes(true);
}

private void axSftDirectoryTV_Combo_CheckBoxClicked(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_CheckBoxClickedEvent e) {
    if (e.newValue != SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryNo &&
            e.newValue != SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes) {
        e.newValue = SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes;

C++

}

void CControlStylesDlg::OnCheckBoxClickedSftDirectoryTV(LPDISPATCH Folder, long OldValue, long FAR* NewValue)
{
    if (*NewValue != checkboxSftDirectoryNo && *NewValue != checkboxSftDirectoryYes)
        *NewValue = checkboxSftDirectoryYes;
    ISftDirectoryPtr vDirTV = m_SftDirectoryTV.GetControlUnknown();
    vDirTV->CurrentFolder->SetSubFolderCheckBoxes((SftDirectoryCheckBoxValueConstants) *NewValue, VARIANT_TRUE);
    vDirTV->CurrentFolder->CheckBox = (SftDirectoryCheckBoxValueConstants) *NewValue;
    vDirTV->RootFolder->EvaluateSubFolderCheckBoxes(VARIANT_TRUE);
}

void CControlStylesDlg::OnCheckBoxClickedSftDirectoryTVCombo(LPDISPATCH Folder, long OldValue, long FAR* NewValue)
{
    if (*NewValue != checkboxSftDirectoryNo && *NewValue != checkboxSftDirectoryYes)
        *NewValue = checkboxSftDirectoryYes;

See Also SftDirectoryFolder Object | Object Hierarchy


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