Widget API: Region:GetPoint

Revision as of 00:58, 12 November 2006 by WoWWiki>Delee

Widget API ← Region < GetPoint Returns information about the anchor points for a region.

Usage

point,relativeTo,relativePoint,xOfs,yOfs = Region:GetPoint()

Returns

point: attachment point for this frame
relativeTo: The frame this frame is attached to (NOTE: this returns the actual widget object, so you need to use "relativeTo:GetName()" to retrieve the object name itself
relativePoint: attachment point for the 'relativeTo' frame
xOfs: x offset
yOfs: y offset

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