Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Tue Jan 22, 2008 5:36 am Post subject: HOWTO : Disable multi-state checkboxes in FolderView ActiveX Control |
|
|
By default, FolderView displays multi-state checkboxes for nodes having 4 states - checked/unchecked/self and child checked/child checked.
This behavior can be overridden and only bi-state checkboxes (checked/unchecked) can be shown by using the following code in the QueryNodeCheckState event.
[VB6]
If Node.CheckState = ChildChecked Then
Node.CheckState = CheckStates.Unchecked
End If
If Node.CheckState = SelfAndChildChecked Then
Node.CheckState = CheckStates.Checked
End If
[C++]
CTreeNode node;
node.AttachDispatch(Node, FALSE);
if(node.GetCheckState() == 3) // ChildChecked 3
node.SetCheckState(1) ; //UnChecked 1
if(node.GetCheckState() == 4) //SelfAndChildChecked 4
node.SetCheckState(2) ; //Checked 2 |
|