# Get position in Widget

**URL:** <https://forums.unrealengine.com/t/get-position-in-widget/478549>\
**Category:** UI\
**Tags:** position, unreal-engine, Widget, Blueprint, question\
**Created:** [February 10, 2021, 6:06am UTC](https://forums.unrealengine.com/t/get-position-in-widget/478549 "2021-02-10T06:06:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theultramadmane](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Theultramadmane](https://forums.unrealengine.com/u/Theultramadmane)\
**Post date:** [February 10, 2021, 6:06am UTC](https://forums.unrealengine.com/t/get-position-in-widget/478549/1 "2021-02-10T06:06:17Z")

</div>

I have a problem on trying to get the position i have in the Widget. What im trying to do is to get the border’s position on the widget, how can i do it?

---

<div class="post-metadata">

**Author:** ![1l2Hawk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/1l2hawk/32/927115_2.png) [@1l2Hawk](https://forums.unrealengine.com/u/1l2Hawk)\
**Post date:** [February 10, 2021, 6:34am UTC](https://forums.unrealengine.com/t/get-position-in-widget/478549/2 "2021-02-10T06:34:34Z")

</div>

Hey T -

If your Border is a direct child of a Canvas Panel, then you can get positional data on it by the following steps:

- Set the Border’s “IsVariable” checkbox to true so you can place it on a graph
- Use the “Slot as Canvas Slot” to find this border as a specific child of the canvas panel (where the position comes from)
- Then call “GetPosition” to get the (x,y) coordinates of that slot (which has your border in it)

I don’t exactly remember … but the origin point of (0,0) might be located in the center of the screen and that might depend on the anchor points you’re using … So the top left might be like -0.5 x screen width and -0.5 x screen height perhaps, so you might need to do some math on the position once you get it to convert to screen space.

 ![329375-border.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/d/17d7683bcd1727c4c2cab74da3cdeafae0564b75.jpeg)

---

<div class="post-metadata">

**Author:** ![1l2Hawk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/1l2hawk/32/927115_2.png) [@1l2Hawk](https://forums.unrealengine.com/u/1l2Hawk)\
**Post date:** [February 10, 2021, 6:46am UTC](https://forums.unrealengine.com/t/get-position-in-widget/478549/3 "2021-02-10T06:46:58Z")

</div>

Yeah, just checked. The position you get is relative to where the anchor point for the border is placed. So with the anchor placed in the center, this white border is up -300 and right +100 from there. If you anchor from the bottom left corner, then all values will be positive from that point up and to the right. Just dont use the anchor where it does from all 4 corners because then you’ll have to deal with top, bottom, left and right values all staying in sync in order for the size of the border to remain the same.

 ![329376-border2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/6/2e61e94f59ccc8df78706433f0e3fe706b0d7f90.jpeg)

---

<div class="post-metadata">

**Author:** ![dudusstar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dudusstar/32/753224_2.png) [@dudusstar](https://forums.unrealengine.com/u/dudusstar)\
**Post date:** [November 17, 2023, 5:45pm UTC](https://forums.unrealengine.com/t/get-position-in-widget/478549/4 "2023-11-17T17:45:33Z")

</div>

Hi! Sorry for being late. Did you finally find out how to do it? I mean, I got this widget with some buttons and I’m creating an “OnDrop” event over. And to check over which button I leave the dragged widget, I need to know the location of the buttons (the surface they occupy). Thanks!

---

<div class="post-metadata">

**Author:** ![MasterKainAG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MasterKainAG](https://forums.unrealengine.com/u/MasterKainAG)\
**Post date:** [February 26, 2024, 5:34am UTC](https://forums.unrealengine.com/t/get-position-in-widget/478549/5 "2024-02-26T05:34:31Z")

</div>

Were you been able to achieve that?
