Region:SetWidth(width) Region:SetHeight(height) Region:SetSize(width, height)
- Number - The desired height of a frame, taking into account its scaling
- Number - The desired width ofa frame, taking into account its scaling
myAddonOptionsParent = myAddonOptions:GetParent(); myAddonOptions:SetHeight(myAddonOptionsParent:GetHeight() / 2);
- The frame named 'myAddonOptions' would be set to half the height of its parent frame.
- These functions are subordinate and complimentary to Region:SetPoint(...) that is used to define one or more anchor points for a region
- If the left and right edges of the region are defined by anchor points, then setting width in this manner has no effect
- If the bottom and top edges of the region are defined by anchor points, then setting height in this manner has no effect
- If insufficient points have been set to define the region's shape, then setting width and/or height in this manner can complete the region
- The actual dimentions normally depends on the region's effective scale, which is the product of its own scale and that of its parents (if any)
- Patch 4.0.1 / API (2010-10-12): SetSize() first appears in FrameXML.
- Patch 1.11.0 / API (2006-06-19): Consolidated to Region.
- Patch 1.10.0 / API (2006-03-28): All Frames, Textures and FontStrings now have SetWidth() and SetHeight()
- Region:GetWidth - Returns the computed width, which may be same as what was set or may result from two or more anchor points
- Region:GetHeight - Returns the computed height, which may be same as what was set or may result from two or more anchor points
- Region:GetSize - Returns the computed width and height, as shorthand for GetWidth() and GetHeight()
- ^ 2010-10-19, ActionBarFrame.xml, version 220.127.116.1164, near line 116, archived at Townlong-Yak
- ^ 2010-10-19, CompactUnitFrame.lua, version 18.104.22.16864, near line 460, archived at Townlong-Yak
- ^ slouken 2006-05-12. Re: Upcoming 1.11 Changes - Concise List. Archived from the original
- ^ slouken 2006-01-27. Re: Upcoming 1.10 Changes - Concise List. Archived from the original