Widget API: Region:GetPoint

From AddOn Studio
Revision as of 08:39, 20 August 2006 by WoWWiki>Jakobud
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 retreive 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