Sets offsets from the frame's edges used when limiting user movement or resizing of the frame. Note: despite the name of this method, the parameters are offsets along the normal axes -- to inset the frame's clamping area from its edges, the left and bottom measurements should be positive and the right and top measurements should be negative.
left- Offset from the left edge of the frame to the left edge of its clamping area (in pixels) (
right- Offset from the right edge of the frame's clamping area to the right edge of the frame (in pixels) (
top- Offset from the top edge of the frame's clamping area to the top edge of the frame (in pixels) (
bottom- Offset from the bottom edge of the frame to the bottom edge of its clamping area (in pixels) (
-- creates a drag-movable frame which cannot be moved beyond the edges of the screen CreateFrame("Frame","Test",UIParent) Test:SetWidth(100) Test:SetHeight(100) Test:SetPoint("CENTER") Test:EnableMouse(true) Test:SetClampedToScreen(true) Test:CreateTexture("TestBG") TestBG:SetAllPoints() TestBG:SetTexture(1,1,1,0.5) Title=Test:CreateTitleRegion() Title:SetAllPoints() -- inset the clamping area, allowing the frame to be moved partially offscreen by 50 pixels in any direction Test:SetClampRectInsets(50,-50,-50,50) -- outset the clamping area, allowing the frame to be moved no closer than 50 pixels to any edge of the screen Test:SetClampRectInsets(-50,50,50,-50)