"isCheckable"
Allows to query whether a item of a Tree Widget is checkable or not.
Synopsis
shape.isCheckable(string id);
Parameter
Parameter | Description |
---|---|
shape | Name of the object |
id | The ID of the item which should be queried. |
Description
isCheckable allows to query whether the item of a tree widget can be checked or not. If the item is checkable the function returns TRUE (1) else FALSE (0) will be returned.
Example
In this example multiple items are added to the parent node WHOLE NAME of the tree widget TREE1. Afterwards some items are set checkable while others are set to not checkable. With the function isCheckable the states for item "MUELLER" and "SCHMIDT" are sent to the log viewer.
main()
{
//Add three columns
TREE1.addColumn("SURNAME");
TREE1.addColumn("FIRST NAME");
TREE1.addColumn("ADDRESS");
//append the item WHOLE NAME
TREE1.appendItemNC("","WHOLE NAME","WHOLE_NAME");
//append three leaves to WHOLE NAME
TREE1.appendItemNC("WHOLE NAME","MUELLER","Mueller");
TREE1.appendItemNC("WHOLE NAME","SCHMIDT","Schmidt");
TREE1.appendItemNC("WHOLE NAME","KAUFMANN","Kaufmann");
//Set the text for the leave node column "NAME"
TREE1.setText("MUELLER",1,"Maria");
TREE1.setText("SCHMIDT",1,"Anna");
TREE1.setText("KAUFMANN",1,"Jan");
//Set the text for the leave node column "ADDRESS"
TREE1.setText("MUELLER",2,"Hauptstr. 1");
TREE1.setText("SCHMIDT",2,"Wienerstr. 10");
TREE1.setText("KAUFMANN",2,"Nebenstr. 100");
//Set the checkable option for the items
TREE1.setCheckable("WHOLE NAME",true);
TREE1.setCheckable("MUELLER",true);
TREE1.setCheckable("SCHMIDT",true);
TREE1.setCheckable("KAUFMANN",true);
DebugN(TREE1.isCheckable("MUELLER"));//Sends TRUE (1) to the log viewer
DebugN(TREE1.isCheckable("SCHMIDT"));//Sends FALSE (0) to the log viewer
}
Assignments
Tree Widget