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
A checkbox is clicked.
VB.NET | Private Sub object_CheckBoxClicked(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.CheckBoxClicked |
VB | Private Sub object_CheckBoxClicked(Folder As SftDirectoryFolder, ByVal OldValue As SftDirectoryCheckBoxValueConstants, NewValue As SftDirectoryCheckBoxValueConstants) |
C#.NET | void object_CheckBoxClicked(object sender, EventArgumentType e); |
VC++ | void OnCheckBoxClickedobject(ISftDirectoryFolder* Folder, enum SftDirectoryCheckBoxValueConstants OldValue, enum SftDirectoryCheckBoxValueConstants* NewValue); |
C | HRESULT OnCheckBoxClickedobject(ISftDirectoryFolder* Folder, enum SftDirectoryCheckBoxValueConstants OldValue, enum SftDirectoryCheckBoxValueConstants* NewValue); |
object
Folder
Defines the folder whose checkbox is clicked.
OldValue
The current checkbox value (before being clicked).
OldValue | Value | Description |
---|---|---|
checkboxSftDirectoryNone | 0 | None - While this is a valid SftDirectoryCheckBoxValueConstants value, it is never passed to the CheckBoxClicked event. |
checkboxSftDirectoryNo | 1 | Not selected - The checkbox option is enabled and not selected. NewValue defaults to checkboxSftDirectoryYes. |
checkboxSftDirectoryYes | 2 | Selected - The checkbox option is enabled and selected. NewValue defaults to checkboxSftDirectoryNo. |
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. |
NewValue
The new checkbox value to take effect once the CheckBoxClicked event is processed.
NewValue | 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 CheckBoxClicked event occurs when a checkbox is clicked.
An application can override the new checkbox state NewValue using the CheckBoxClicked event.
The checkbox state of a folder does not automatically affect its child folders' or parent folder's checkbox states. If desired, these must be updated explicitly using the SetSubFolderCheckBoxes method or the EvaluateSubFolderCheckBoxes method.
This event is typically implemented to handle checkbox states other than yes/no (checkboxSftDirectoryYes and checkboxSftDirectoryNo). By default, checkbox state checkboxSftDirectoryNo is toggled to checkboxSftDirectoryYes and vice versa. Other checkbox states such as checkboxSftDirectoryUnknown, checkboxSftDirectoryNoDisabled, checkboxSftDirectoryYesDisabled or checkboxSftDirectoryUnknownDisabled are not altered, but can be modified using the CheckBoxClicked event, by supplying a new state NewValue.
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) AxSftDirectoryTV_Combo.CurrentFolder.CheckBox = e.newValue AxSftDirectoryTV_Combo.RootFolder.EvaluateSubFolderCheckBoxes(True)
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
else style = SftDirectoryHeadersStyleConstants.headersSftDirectoryNone; axSftDirectoryTV.Headers.Style = style; axSftDirectoryDL.Headers.Style = style; axSftDirectoryTV_Combo.Headers.Style = style; axSftDirectoryDL_Combo.Headers.Style = style; } 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);
ISftDirectoryPtr vDirDL = m_SftDirectoryDL.GetControlUnknown(); vDirDL->Headers->Style = style; ISftDirectoryPtr vDirTV_Combo = m_SftDirectoryTV_Combo.GetControlUnknown(); vDirTV_Combo->Headers->Style = style; ISftDirectoryPtr vDirDL_Combo = m_SftDirectoryDL_Combo.GetControlUnknown(); vDirDL_Combo->Headers->Style = style; } 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);
See Also SftDirectory Object | Object Hierarchy