The API is no longer being updated here until further notice. |
Returns information about the anchor points for a region.
point, relativeTo, relativePoint, xOfs, yOfs = MyRegion:GetPoint(n)
Arguments
- n
- integer - number of point about which you want to retrieve info. Should be in range 1 .. MyRegion:GetNumPoints()
Returns
- point
- Anchor - attachment point of frame MyFrame
- relativeTo
- Region - The frame MyFrame is attached to (NOTE: this returns the actual widget object, if you want to get that object's name, use relativeTo:GetName())
- relativePoint
- Anchor - attachment point of the relativeTo frame
- xOfs
- number - horizontal offset; not necessarily integer (positive xOfs means shift to the right)
- yOfs
- number - vertical offset; not necessarily integer (positive yOfs means shift upwards)
Example
point,relativeTo,relativePoint,xOfs,yOfs = MyAddon_Frame1:GetPoint() DEFAULT_CHAT_FRAME:AddMessage(point) DEFAULT_CHAT_FRAME:AddMessage(relativeTo:GetName()) DEFAULT_CHAT_FRAME:AddMessage(relativePoint) DEFAULT_CHAT_FRAME:AddMessage(xOfs) DEFAULT_CHAT_FRAME:AddMessage(yOfs)
Result
TOP MyAddon_Frame0 BOTTOM 0 -10