Frame:SetClampedToScreen
Jump to navigation
Jump to search
Prevents the frame from moving off-screen.
Frame:SetClampedToScreen(clampedToScreen)
Arguments
- clampedToScreen
- boolean - True to enable clamping, false to permit moving off-screen.
Details
- Frame:SetClampRectInsets() defines padding within/beyond the screen edges.
- This method prevents the frame from being moved partially off-screen by the following methods:
- Any calls to Region:SetPoint()
- User dragging after Frame:StartMoving()
- User resizing after Frame:StartSizing()
Example
Despite calling SetPoint() toward 100 pixels beyond the left screen edge, the SpellBookFrame remains fully visible on the screen:
SpellBookFrame:Show()
SpellBookFrame:SetClampedToScreen(true)
SpellBookFrame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -100, 0)
Patch changes
- Patch 1.11.0 (2006-06-19): Added.