ScriptRegionResizing:SetSize

From Warcraft Wiki
Jump to navigation Jump to search
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png ScriptRegion:GetSize
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png ScriptRegion:GetWidth
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png ScriptRegion:GetHeight
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png ScriptRegionResizing:SetSize
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png ScriptRegionResizing:SetWidth
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png ScriptRegionResizing:SetHeight

Sets the width and height of the region.

ScriptRegionResizing:SetSize(width, height)
ScriptRegionResizing:SetWidth(width)
ScriptRegionResizing:SetHeight(height)

Arguments

width
number - The width of the region.
height
number - The height of the region.

Example

Creates a frame with a width of 100 and height of 50.

local f = CreateFrame("Frame", nil, nil, "BackdropTemplate")
f:SetPoint("CENTER")
f:SetSize(100, 50)
f:SetBackdrop(BACKDROP_TUTORIAL_16_16)

API ScriptRegionResizing SetSize 01.png


If the width/height is inferred from anchor points, then setting it has no effect.

local f = CreateFrame("Frame", nil, UIParent)
f:SetAllPoints()

print(f:GetSize()) -- 2133.3334960938, 1200
f:SetSize(100, 100)
print(f:GetSize()) -- 2133.3334960938, 1200

See also