Hi!
I would like write a function for find a data in the tree. But I getting gave up... I wrote this until now:
long idxroot, idxchild, idx, ret
treeviewitem tvi
idx = tv_1.finditem ( roottreeitem!, 0)
idxchild = tv_1.finditem ( childtreeitem!, idx )
do while idxchild <> -1
do while idx <> -1
ret = tv_1.getitem( idx , tvi )
if tvi.data = ID then return ret
idx = tv_1.finditem( nexttreeitem!, idx )
loop
idxchild = tv_1.finditem ( childtreeitem!, idxchild )
idx = idxchild
loop
return idx
I would like write a function for find a data in the tree. But I getting gave up... I wrote this until now:
long idxroot, idxchild, idx, ret
treeviewitem tvi
idx = tv_1.finditem ( roottreeitem!, 0)
idxchild = tv_1.finditem ( childtreeitem!, idx )
do while idxchild <> -1
do while idx <> -1
ret = tv_1.getitem( idx , tvi )
if tvi.data = ID then return ret
idx = tv_1.finditem( nexttreeitem!, idx )
loop
idxchild = tv_1.finditem ( childtreeitem!, idxchild )
idx = idxchild
loop
return idx