WoW:API Frame SetClampedToScreen: Difference between revisions
Jump to navigation
Jump to search
(New page: Set whether the frame is prohibited from being positioned or dragged off screen. This applies to any attempt of repositioning a frame partially or entirely off screen. If the frame is clam...) |
m (Move page script moved page API Frame SetClampedToScreen to API Frame SetClampedToScreen without leaving a redirect) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{stub/API}} | |||
{{wowapi}} | |||
Set whether the frame is prohibited from being positioned or dragged off screen. This applies to any attempt of repositioning a frame partially or entirely off screen. If the frame is clamped to the screen boundaries then the frame points will be re-adjusted automatically so that the entire frame always stays on screen. Examples where this applies: | Set whether the frame is prohibited from being positioned or dragged off screen. This applies to any attempt of repositioning a frame partially or entirely off screen. If the frame is clamped to the screen boundaries then the frame points will be re-adjusted automatically so that the entire frame always stays on screen. Examples where this applies: | ||
* calling SetPoint() | * calling SetPoint() |
Latest revision as of 04:45, 15 August 2023
← WoW API < Frame SetClampedToScreen
Set whether the frame is prohibited from being positioned or dragged off screen. This applies to any attempt of repositioning a frame partially or entirely off screen. If the frame is clamped to the screen boundaries then the frame points will be re-adjusted automatically so that the entire frame always stays on screen. Examples where this applies:
- calling SetPoint()
- dragging the frame after calling StartMoving()
- sizing the frame after calling StartSizing()
Parameters[edit]
- clamped
- Boolean - Whether to enable (true) or disable (false) the clamping of the frame to the screen boundaries
Returns[edit]
- unknown -
Example[edit]
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 )