How do i get the screen coordinates of an IHTMLElement?
-
I have tried to use a combination of get_offsetheight,get_offsetwidth,get_offsettop and getoffsetleft but the values returned are in reference to the immediate parent.
-
I have tried to use a combination of get_offsetheight,get_offsetwidth,get_offsettop and getoffsetleft but the values returned are in reference to the immediate parent.
What do you mean by screen coordinates? Did you try "walking up" the inheritance tree, adding the offsets till you reach the top?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<
-
I have tried to use a combination of get_offsetheight,get_offsetwidth,get_offsettop and getoffsetleft but the values returned are in reference to the immediate parent.
Hello. That's exactly what the method you're invoking returns, the height/width referenced to its parent coordinate system. If you want to get the offset referenced to the screen (1st level of DOM) you can get it by adding all offset values invoking recursively to 'get_offsetParent' method (n-1) times. Hope it helps. Regards