Check box automation settings.
Set_Property(OLECtrlEntID, "OLE.CheckBehavior", Array) |
Array has the following structure:
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<1> | Auto Check | Option | Auto update parent/child check boxes | None |
<2> | Link to Selection | Boolean | Determines if checking/unchecking will select/unselect an item | 0 |
<3> | Drag Click | Boolean | Determines if the user can click and drag to check multiple check boxes at once | 1 |
The CheckBehavior property establishes how the control automates check box checking. This property has three fields:
The Auto Check field can be used to synchronize check boxes. This field can be one of four values: None, Children, Parents, or Both.
When set to None, which is the default, then clicking a check box has no affect on any other checkboxes.
When set to Parent, then when a check box is clicked, the item's parents' check boxes are updated to reflect the check box states of all the item's siblings. In other words, after clicking an item, if all its parent's children are checked, then the parent is checked. If all its parent's children are unchecked, then the parent is unchecked. If some of its parent's children are checked and some are not checked, then the parent's check box is set to undetermined.
When set to Children, then the clicking an item's check box will force all its children's check boxes to the same state. When set to Both, then clicking an item's check box will update both its parents and its children.
If you want an item to become selected when checked and unselected when unchecked, then set the Link to Selection field to 1.
When setting the Link to Selection field to 1, you may also want to set the SelectBehavior property to Multi or Toggle. Also, be aware that the Link to Selection behavior does not work in reverse. That is to say, selecting an item will not update the item's check box.
The Drag Click field enables or disables the user's ability to click multiple check boxes in one drag and click operation. When this field is set to 1, which is the default, then the user can click on a check box and drag over other check boxes in order to set contiguous check boxes to the same value. Settings this field to 0 will disable the effect, forcing the user to click check boxes individually.
CheckBehavior = "" CheckBehavior<1> = "Parent" ;// Automatically update parent check boxes CheckBehavior<2> = 0 ;// Do not select items when clicking check boxes CheckBehavior<3> = 1 ;// Allow the user to drag and click check boxes Set_Property(@Window:".OLE_TREE", "OLE.CheckBehavior", CheckBehavior) |
CheckBoxConditions, EnterBehavior, ExpandBehavior, SelectBehavior