Prevents the frame from being moved off-screen.
This method is available on any widget inheriting from Frame.
- Boolean - true to enable clamping, false to allow the frame to be moved off-screen.
The following sample code should cause the spell book frame to be places halfway outside the screen. Instead it stays fully inside of the screen.
SpellBookFrame:Show() SpellBookFrame:SetClampedToScreen( true ) SpellBookFrame:SetPoint( "TOPLEFT", UIParent, "TOPLEFT", 1000, -100 )
The method prevents the frame from being moved partially off-screen by the following methods:
- Any Region:SetPoint() calls
- User dragging after Frame:StartMoving()
- User resizing after Frame:StartSizing()
- Patch 1.11.0 (2006-06-19): Added.