Hi,
this is a recursiv function to select/unselect a node and his children with the checkmark feature of the wd16 treeview.
Call the function in the treeview "whenever modified" event with the full path of the current node. I think that must be a built in function in future releases of WD.
---------------------------------------------------------------------------------------------------------------
PROCEDURE Treeview_click_auswerten(sNode is string="")
bStatus is boolean=TREE_Gesamtstruktur[sNode]..Checked
sChild, sChildPath is string
sChild=TreeGiveChild(TREE_Gesamtstruktur,sNode,tvFirst)
IF sChild="" THEN
RESULT ""
ELSE
sChildPath=sNode+TAB+sChild
TREE_Gesamtstruktur[sChildPath]..Checked=bStatus
Treeview_click_auswerten(sChildPath)
END
WHILE sChild<>""
sChild=TreeGiveChild(TREE_Gesamtstruktur,sNode,tvNext)
IF sChild="" THEN
Treeview_click_auswerten(sChildPath)
ELSE
sChildPath=sNode+TAB+sChild
TREE_Gesamtstruktur[sChildPath]..Checked=bStatus
Treeview_click_auswerten(sChildPath)
END
END