How to auto move popup window by mouse action?

i can used function to get point x,Y:
system.gui.convertPointToScreen(event.x, event.y, event)

but i don’t know how to set the popup window startinglocation value?

i had find the solution:

system.gui.openWindow(‘valve’)
system.gui.getWindow(‘valve’).setLocation(int x,int y)

I found this in the manual and copied it exactly into my MouseReleased event and it returns an error.
coords = system.gui.convertPointToScreen(event.x, event.y, event)
event.source.getComponent(‘A_Label’).text = “x: %s y: %s” %(coords[0], coords[1])

The error is that getComponent cannot coerce the first argument to integer.
Why can’t the text of a label not display an integer as text.
I also tried toString but that didnt help

I actually found what I was looking for. I wanted to open a popup window and send it the X, Y coordinates of where the button was pushed and position the popup instance close to where the button was pushed.
I got it working with system.gui.convertPointToScreen, and system.gui.getWindow(‘name’).setLocation