Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

ControlStyles Sample (VB6)

This sample demonstrates the control styles (ControlStyle property).

The source code is located at C:\Program Files (x86)\Softelvdm\SftDirectory 3.5\Samples\VB6\ControlStyles\Form1.frm or C:\Program Files\Softelvdm\SftDirectory 3.5\Samples\VB6\ControlStyles\Form1.frm (on 32-bit Windows versions).

Private Sub CheckTreeLines_Click()
    Dim Style As SftDirectoryTreeLineStyleConstants

    If CheckTreeLines.Value <> 0 Then
        Style = treeLineStyleSftDirectoryDotted
    Else
        Style = treeLineStyleSftDirectoryNone
    End If
    SftDirectoryTV.TreeLineStyle = Style
    SftDirectoryDL.TreeLineStyle = Style
    SftDirectoryTV_Combo.TreeLineStyle = Style
    SftDirectoryDL_Combo.TreeLineStyle = Style
End Sub

Private Sub CheckCheckBoxes_Click()
    Dim Style As SftDirectoryCheckBoxDisplayConstants

    If CheckCheckBoxes.Value <> 0 Then
        Style = checkboxDisplaySftDirectoryAll
    Else
        Style = checkboxDisplaySftDirectoryNone
    End If
    SftDirectoryTV.ShowCheckBoxes = Style
    SftDirectoryDL.ShowCheckBoxes = Style
    SftDirectoryTV_Combo.ShowCheckBoxes = Style
    SftDirectoryDL_Combo.ShowCheckBoxes = Style
End Sub

Private Sub CheckShowHeaders_Click()
    Dim Style As SftDirectoryHeadersStyleConstants

    If CheckShowHeaders.Value <> 0 Then
        Style = headersSftDirectoryButton
    Else
        Style = headersSftDirectoryNone
    End If
    SftDirectoryTV.Headers.Style = Style
    SftDirectoryDL.Headers.Style = Style
    SftDirectoryTV_Combo.Headers.Style = Style
    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
    SftDirectoryTV_Combo.CurrentFolder.SetSubFolderCheckBoxes NewValue, True
    SftDirectoryTV_Combo.CurrentFolder.CheckBox = NewValue
    SftDirectoryTV_Combo.RootFolder.EvaluateSubFolderCheckBoxes True
End Sub

Private Sub Form_Load()
    CheckTreeLines.Value = 1
End Sub

Private Sub CloseCommand_Click()
    Unload Form1
End Sub


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