# \[UMG\] Creating lines between different widgets

**URL:** <https://forums.unrealengine.com/t/umg-creating-lines-between-different-widgets/415938>\
**Category:** UI\
**Tags:** slot, viewport, unreal-engine, Blueprint, question, UMG\
**Created:** [January 30, 2018, 6:06pm UTC](https://forums.unrealengine.com/t/umg-creating-lines-between-different-widgets/415938 "2018-01-30T18:06:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f7c0f7221](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f7c0f7221](https://forums.unrealengine.com/u/anonymous_user_f7c0f7221)\
**Post date:** [January 30, 2018, 6:06pm UTC](https://forums.unrealengine.com/t/umg-creating-lines-between-different-widgets/415938/1 "2018-01-30T18:06:51Z")

</div>

Hello,

I’m trying to create a dynamic [tree chart](https://www.edrawsoft.com/templates/images/blank-tree-chart.png) in my interface.

The nodes for tree are contained in this organization:

```
   Canvas Panel -> Border -> Canvas Panel -> ScrollBox(V) -> Scroll Box (H) -> Node

```

As a tree chart, I want to be able to connect the different nodes in my tree. The problem lies with getting the positions of the Nodes in the coordinates that I want.

I realize from my searches that it’s not linear to get the coordinates for those nodes but I can’t seem to get the positions.

I tried to get the cached geometry from those slots and convert local to viewport (Local Coordinates = 0,0) but the final Viewport Position is not the correct one.

Has anyone tried to do something like this? Can anyone help me?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f7c0f7221](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f7c0f7221](https://forums.unrealengine.com/u/anonymous_user_f7c0f7221)\
**Post date:** [February 13, 2018, 5:20pm UTC](https://forums.unrealengine.com/t/umg-creating-lines-between-different-widgets/415938/2 "2018-02-13T17:20:11Z")

</div>

I realized that I don’t need to know the absolute viewport positions in order to draw the line between two nodes. So, with some math I managed to achieve my objective.
