As i got several mails concerning this one, here the procedure which allows to replace the pre-v4 one:
Code: Select all
Procedure CountTreeGadgetNodeItems(Gadget, Index)
Level = GetGadgetItemAttribute(Gadget, Index, #PB_Tree_SubLevel)
Repeat
Index + 1
If GetGadgetItemAttribute(Gadget, Index, #PB_Tree_SubLevel) >= Level+1
Count+1
Else
Break
EndIf
ForEver
ProcedureReturn Count
EndProcedure