pbEnableCheckboxes - AbstractTreeView
Enables the use of checkboxes in items
Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None
Syntax
Property Boolean pbEnableCheckboxes
| Access Type | Syntax |
|---|---|
| Read Access: | Get pbEnableCheckboxes to BooleanVariable |
| Write Access: | Set pbEnableCheckboxes to BooleanVariable/Value |
Description
Enables the use of checkboxes in TreeView items.
By default, makes all TreeView items checkbox items when set to True. To change this for any given item, call ItemCheckBox.
This is a design time only property and must be set before the TreeView is paged.
Sample
This sample shows how to enable the use of checkboxes in a TreeView.
Object oTreeView1 is a TreeView
Set Size to 158 141
Set Location to 15 12
Set pbEnableCheckboxes to True
...
Sample
This sample shows how to enable the use of checkboxes in a TreeView and how to disable the checkboxes for some TreeView items.
Object oTreeView1 is a TreeView
Set Size to 158 141
Set Location to 15 12
Set pbEnableCheckboxes to True
// called when TreeView is created
Procedure OnCreateTree
Handle hRoot hBranch
// create root node
Get AddTreeItem "Root" 0 0 0 0 to hRoot
// disable checkbox for root node
Set ItemCheckBox hRoot to False
// create branch nodes
// these will display with checkboxes, since the checkbox for each is not being disabled
Get AddTreeItem "Branch1" hRoot 0 0 0 to hBranch
Get AddTreeItem "Branch2" hRoot 0 0 0 to hBranch
Get AddTreeItem "Branch3" hRoot 0 0 0 to hBranch
End_Procedure
End_Object