Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API Region GetPoint
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{widgetmethod}} __NOTOC__ Returns information about the anchor points for a region. point, relativeTo, relativePoint, xOfs, yOfs = MyRegion:GetPoint(n) == Parameters == === Arguments === ; n : integer - number of point about which you want to retrieve info. Should be in range <tt>1 .. MyRegion:GetNumPoints()</tt> === Returns === ; point : [[UITYPE FramePoint|FramePoint]] -- attachment point of frame <tt>MyFrame</tt> ; relativeTo : Region -- The frame <tt>MyFrame</tt> is attached to (NOTE: this returns the actual widget object, if you want to get that object's name, use <tt>relativeTo:GetName()</tt>) ; relativePoint : [[UITYPE FramePoint|FramePoint]] -- attachment point of the <tt>relativeTo</tt> frame ; xOfs : number -- horizontal offset; not necessarily integer (positive <tt>xOfs</tt> means shift to the right) ; yOfs : number -- vertical offset; not necessarily integer (positive <tt>yOfs</tt> 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 == Notes == * As of 2.2 the screen coordinates are no longer relative to the TOPLEFT instead they are relative to closest screen position which can be TOPLEFT, TOP, TOPRIGHT, LEFT, CENTER, RIGHT, BOTTOMLEFT, BOTTOM and BOTTOMRIGHT be sure to use/save the relativePoint argument in addition to xOfs and yOfs for frame positioning or your frames will appear at the wrong place and even off the screen.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Widget
(
edit
)
Template:Widgetmethod
(
edit
)