WoW:API Region GetPoint: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
Line 8: Line 8:


point: attachment point for this frame<br>
point: attachment point for this frame<br>
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<br>
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<br>
relativePoint: attachment point for the 'relativeTo' frame<br>
relativePoint: attachment point for the 'relativeTo' frame<br>
xOfs: x offset<br>
xOfs: x offset<br>

Revision as of 21:32, 13 September 2006

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