Frame:SetClampedToScreen()

From Wowpedia
Jump to: navigation, search

Prevents the frame from being moved off-screen.

Frame:SetClampedToScreen()

This method is available on any widget inheriting from Frame.

Arguments

clamped 
Boolean - true to enable clamping, false to allow the frame to be moved off-screen.

Example

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 )

Details

The method prevents the frame from being moved partially off-screen by the following methods:

Patch changes

See also