Sets an attachment point of an UI component.

obj:SetPoint(point, relativeTo, relativePoint, ofsx, ofsy);
obj:SetPoint(point, relativeTo, relativePoint);
obj:SetPoint(point, ofsx, ofsy);


String - Point of the object to adjust based on the anchor.
String/Widget - Name or reference to a Region to attach obj to. If not specified in the call's signature, defaults to obj's parent (or, if obj has no parent, the entire screen), or if specified in the signature and passed nil, defaults to the entire screen.
String - point of the relativeTo Region to attach point of obj to. If not specified, defaults to the value of point.
Number - x-offset (negative values will move obj left, positive values will move obj right), defaults to 0 if not specified, if ofsy is not specified, or if both relativeTo and relativePoint are specified and nil.
Number - y-offset (negative values will move obj down, positive values will move obj up), defaults to 0 if not specified, if ofsx is not specified, or if both relativeTo and relativePoint are specified and nil.


There are nine valid point values:

  • "TOP", "RIGHT" "BOTTOM" "LEFT": the center-points of the respective sides.
  • "TOPRIGHT", "TOPLEFT", "BOTTOMLEFT", "BOTTOMRIGHT": corners of the rectangle.
  • "CENTER": the center point of the rectangle.


The following are calls all equivalent; the last two assume that the parent of MainMenuBar has a name, and is UIParent respectively.

MainMenuBar:SetPoint("BOTTOMLEFT", 0, 0);
MainMenuBar:SetPoint("BOTTOMLEFT", MainMenuBar:GetParent());
MainMenuBar:SetPoint("BOTTOMLEFT", MainMenuBar:GetParent(), "BOTTOMLEFT");
MainMenuBar:SetPoint("BOTTOMLEFT", MainMenuBar:GetParent(), "BOTTOMLEFT", 0, 0);
MainMenuBar:SetPoint("BOTTOMLEFT", MainMenuBar:GetParent():GetName(), "BOTTOMLEFT", 0, 0);
MainMenuBar:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMLEFT", 0, 0);


  • Behavior of this function with multiple anchors is complex. Generally, you can override points by setting them again (so repeated assignment to the "TOPLEFT" point of a frame would move the frame, unless other anchor points interfere). If you're repositioning a frame, call obj:ClearAllPoints() to eliminate unwanted interactions.
  • Offset units are relative to the screen's effective scale. WoW's screen always has a height of 768 units, while screen width varies with aspect ratio.
  • ofsx and ofsy must both be passed as arguments for either to take effect; they default to 0 only when neither is given. That is, foo:SetPoint(bar, 40) will ignore the 40 rather than treat it as (+40,+0).
  • Protected frames may silently ignore calls to this function if the relative frame is a FontString.

Edge definitions

The edge "points" (TOP, RIGHT, BOTTOM, LEFT) are not actual points, but... edges. To fully define a region position using edges alone, you will need to define all four (as opposed to using corners, where you only need two) edges.

Therefore, defining an edge does not necessarily place a region relative to the center of that edge (For example, if you define TOP and RIGHT, the region will be placed at the TOPRIGHT corner). However, by default a region is "pulled" to the center if the number of points defined is insufficient.


Region:SetPoint("TOP", relativeframe);

will place Region to the top center of the relativeframe while adding a

Region:SetPoint("RIGHT", relativeframe);

will place Region in the top right corner and now Region is fully defined.

Patch changes

Battle for Azeroth Patch 8.2.0 / API (2019-06-25): "Frames that are anchored to a restricted frame can only have their other anchors set to frames within that same anchor hierarchy" (Source)

See also