Sets an anchor point for the region
Signature:
Region:SetPoint("point" [, relativeTo [, "relativePoint" [, xOffset [, yOffset]]]])
Arguments:
point- Point on this region at which it is to be anchored to another (string, anchorPoint)relativeTo- Reference to the other region to which this region is to be anchored; if omitted, anchors the region relative to its parent (or to the screen dimensions if the region has no parent). If passed explicitelynil, defaults to the entire screen. (region)relativePoint- Point on the other region to which this region is to be anchored; ifnilor omitted, defaults to the same value aspoint(string, anchorPoint)xOffset- Horizontal distance betweenpointandrelativePoint(in pixels; positive values putpointto the right ofrelativePoint); ifnilor omitted, defaults to0(number)yOffset- Vertical distance betweenpointandrelativePoint(in pixels; positive values putpointbelowrelativePoint); ifnilor omitted, defaults to0(number)
Examples:
-- Create a sample frame and give it a visible background color
local frame = CreateFrame("Frame", "TestFrame", UIParent)
local background = frame:CreateTexture("TestFrameBackground", "BACKGROUND")
background:SetTexture(1, 1, 1, 0.25)
background:SetAllPoints()
-- Set the top left corner 5px to the right and 15px above UIParent's top left corner
frame:SetPoint("TOPLEFT", 5, 15)
-- Set the bottom edge to be 10px below WorldFrame's center
frame:SetPoint("BOTTOM", WorldFrame, "CENTER", 0, -10)
-- Set the right edge to be 20px to the left of WorldFrame's right edge
frame:SetPoint("RIGHT", WorldFrame, -20, 0)