Wowpedia
Advertisement
Wowpedia
233,703
pages

Sets the desired width and height of a Region, relative to its own effective scaling.

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

Arguments

width 
Number - The desired height of a frame, taking into account its scaling
height 
Number - The desired width ofa frame, taking into account its scaling

Example

myAddonOptionsParent = myAddonOptions:GetParent();
myAddonOptions:SetHeight(myAddonOptionsParent:GetHeight() / 2);
Result
The frame named 'myAddonOptions' would be set to half the height of its parent frame.

Notes

  • 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 changes

See also

  • 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()

References

 
  1. ^ 2010-10-19, ActionBarFrame.xml, version 4.0.1.13164, near line 116, archived at Townlong-Yak
  2. ^ 2010-10-19, CompactUnitFrame.lua, version 4.0.1.13164, near line 460, archived at Townlong-Yak
  3. ^ Blizzard Entertainment slouken 2006-05-12. Re: Upcoming 1.11 Changes - Concise List. Archived from the original
  4. ^ Blizzard Entertainment slouken 2006-01-27. Re: Upcoming 1.10 Changes - Concise List. Archived from the original
Advertisement