Question

If I have a rectangle on a page and I call GetROProperty("X") and GetROProperty("Y"), which corner am I getting? Or am I getting dead center?

Was it helpful?

Solution

GetROProperty("x") and GetROProperty("y") give you the left and top coordinates of the object relative to the 'frame' which I take to mean the containing display surface. In the case of a web application this would be the parent Page or Frame object.

So for example getting the "x" and "y" properties for a textbox on one of my apps gives me 840, 41. The textbox is 124 pixels from the top of the screen, but it's 41 pixels relative to the bottom of the browser's chrome/menubar. (Since there is no browser chrome on the left, it's 840 pixels relative to both the left edge of the page area and the screen edge)

If you want screen coords relative to the top-left of the screen you can get the "abs_x" and "abs_y" properties.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top