Retrieve Widget Position from buttons (for Gamepad navigation)

Hi,

for navigating the UI with the gamepad in all 4 directions, I would like to get a widgets position (buttons mostly) so that I can sort them by x and by y coordinates for vertical and horizontal gamepad navigation. All solutions that I found require the widgets to be on-screen, but I would like to make the calculation once, before the popup is rendered on screen. Is there any way to get a widget position before its rendered, for example from the design phase how it was originally intended? I just need some relative coordinates for sorting them for the menu gamepad navigation.

Thanks in advance