SftDirectory 2.5

SftDirectoryFolder.EvaluateSubFolderCheckBoxes Method

Softel vdm, Inc.

Updates the file/folder's checkbox based on all subfolders' checkboxes.

Syntax       

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

Delphi

Value := object.EvaluateSubFolderCheckBoxes(Depth : WordBool)  : TOleEnum;

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.

Comments

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.


Feedback / comments / error reports for this topic
© 2003, 2008 - Softel vdm, Inc. - www.softelvdm.com