B4J Question How to get the Index of Child members in TreeView

AndroidMadhu

Active Member
Licensed User
Hi,

I want to get the index of Child members as well as Parent members in TreeView.

How to get the indexes ? Please advice

Thanks
 

teddybear

Well-Known Member
Licensed User
You can get the indices by traversing the TreeView.
B4X:
Dim idx as int = 0
For Each item as TreeItem in TreeView1.Root.Children
    For Each subitem as TreeItem in item.children
        'Here you can map item to idx
        idx = idx +  1
    next
next

 
Last edited:
Upvote 0
Top