Open popup at bottom right corner of the window

This assumes that your window is full screen, which I do not feel is correct. You need to get your parent window size. To position a popup on the left side of the parent window, your x coordinate is going to be 0. To position a popup at the bottom of the parent window, your y coordinate will be the height of the parent window minus the height of the popup window.

The code will need to look something like this:

parentWindow = system.gui.getParentWindow(event)
popup = system.nav.openWindow('Popup')
x = 0
y = parentWindow.height - popup.height
popup.setLocation(x, y)

Edit: I should note that height is an absolute property that is measured in pixels. Therefore, there shouldn't be any need to consider screen resolution; it will already be accounted for.

2 Likes