TreeView connected Lines

Hi,

what would be my best approch to implement “lines” in the Runtime TreeView?
I tried to search for it, but i didnt find an awnser.

Currently i have this:
9128590--1267162--upload_2023-7-6_12-43-41.png

I would like to replace the teal Areas with something like this:

  1. Question: Do the Entries/Elements know about if they are “the last of current indentation” or any other Information i could use to code something up myself?

Alright, nevermind. I found a way.

9128698--1267204--upload_2023-7-6_13-49-50.png

Solution: the individual Elements have 2 addition absolutly positioned images to the left of them. Binding i run a check if they are the last element in their Parents list. Like this:

...
else if (treeV.GetItemDataForIndex<object>(index) is sdGalaxy g)
                {
                    plListEntry.sLabel.text = g.Name;
                    plListEntry.sToggle.visible = false;
                    plListEntry.sImageVisualElement.style.backgroundImage = icon_galaxy;
                    //plListEntry.parent.parent.style.left = -15;

                    if (g.Sectors.Count > 0)
                    {
                        plListEntry.sVisualElementTreeTrunk.visible = false;
                        plListEntry.sVisualElementTreeTrunk_L.visible = false;
                    }
                    else
                    {
                        if (g.Parent.Galaxies.IndexOf(g) == g.Parent.Galaxies.Count - 1)
                        {
                            plListEntry.sVisualElementTreeTrunk.visible = false;
                            plListEntry.sVisualElementTreeTrunk_L.visible = true;
                        }
                        else
                        {
                            plListEntry.sVisualElementTreeTrunk_L.visible = false;
                            plListEntry.sVisualElementTreeTrunk.visible = true;
                        }
                    }
                }
...

This simple implementation is ok for now. I just hope that i dont come in problems with the virtualizer, because i cant be 100% sure if what is the last element in the object list is also the “most bottom” element of the indent for the virtualized tree.