ItemCheckBox - AbstractTreeView
Determines whether an item has a checkbox or not
Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None
Parameters
| Parameter | Type | Description |
|---|---|---|
| hItem | Handle | Item handle |
Syntax
Property Boolean ItemCheckBox
| Access Type | Syntax |
|---|---|
| Read Access: | Get ItemCheckBox to BooleanVariable |
| Write Access: | Set ItemCheckBox to BooleanVariable/Value |
Description
Determines whether a TreeView item has a checkbox or not.
pbEnableCheckboxes must be True for this to work.
Sample
This sample shows how to check whether a TreeView item has a checkbox or not.
Handle hItem
Boolean bHasCheckBox
...
/// do something to get an item handle
...
Get ItemCheckBox hItem to bHasCheckBox
Sample
This sample shows how to set a TreeView item to have a checkbox.
Handle hItem
...
/// do something to get an item handle
...
Set ItemCheckBox hItem 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