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
Updates the file/folder's checkbox based on all subfolders' checkboxes.
VB.NET | Value = object.EvaluateSubFolderCheckBoxes(ByVal Depth As Boolean) As SftDirectoryCheckBoxValueConstants |
VB | Value = object.EvaluateSubFolderCheckBoxes(ByVal Depth As Boolean) As SftDirectoryCheckBoxValueConstants |
C#.NET | SftDirectoryCheckBoxValueConstants Value = object.EvaluateSubFolderCheckBoxes(bool Depth); |
VC++ | enum SftDirectoryCheckBoxValueConstants Value = object->EvaluateSubFolderCheckBoxes(VARIANT_BOOL Depth); |
C | HRESULT object->raw_EvaluateSubFolderCheckBoxes(VARIANT_BOOL Depth, enum SftDirectoryCheckBoxValueConstants* Value); |
object
A SftDirectoryFolder object.
Depth
Defines the depth of subfolders to be scanned to evaluate the checkbox status.
Depth | Description |
---|---|
True | Scan all subfolders (and their subfolders) recursively to determine the checkbox status for this file/folder. |
False | Scan only immediate folders owned by the current folder to determine the checkbox status for this file/folder. |
Value
Returns the new checkbox status.
Value | Value | Description |
---|---|---|
checkboxSftDirectoryNone | 0 | None - The checkbox is removed. |
checkboxSftDirectoryNo | 1 | Not selected - The checkbox option is enabled and not selected. |
checkboxSftDirectoryYes | 2 | Selected - The checkbox option is enabled and selected. |
checkboxSftDirectoryUnknown | 3 | Unknown - The checkbox option is enabled and unknown. |
checkboxSftDirectoryNoDisabled | 4 | Not selected, disabled - The checkbox option is disabled and not selected. |
checkboxSftDirectoryYesDisabled | 5 | Selected, disabled - The checkbox option is disabled and selected. |
checkboxSftDirectoryUnknownDisabled | 6 | Unknown, disabled - The checkbox option is disabled and unknown. |
The EvaluateSubFolderCheckBoxes method updates the file/folder's checkbox based on all subfolders' checkboxes.
If all subfolders have the same checkbox status, the file/folder's status is updated with the same status, otherwise the status is combined using the following rules:
SubFolder 1 checkboxSftDirectory ... | SubFolder 2 checkboxSftDirectory ... | Resulting Combined Value |
---|---|---|
both folders have the same checkbox status | checkbox status is used as-is | |
None | any value | SubFolder 2 status is used |
Unknown | any value | Unknown |
No | No | No |
No | Yes | Unknown |
Yes | Yes | Yes |
If either folder is "Disabled", the resulting combined value is also "Disabled" |
The SetSubFolderCheckBoxes method can be used to update all subfolders' checkboxes.
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 End If AxSftDirectoryTV_Combo.CurrentFolder.SetSubFolderCheckBoxes(e.newValue, True)
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 SftDirectoryTV_Combo.CurrentFolder.SetSubFolderCheckBoxes NewValue, True
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; } axSftDirectoryTV_Combo.CurrentFolder.SetSubFolderCheckBoxes(e.newValue, true);
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; ISftDirectoryPtr vDirTV_Combo = m_SftDirectoryTV_Combo.GetControlUnknown(); vDirTV_Combo->CurrentFolder->SetSubFolderCheckBoxes((SftDirectoryCheckBoxValueConstants) *NewValue, VARIANT_TRUE);
See Also SftDirectoryFolder Object | Object Hierarchy