Wowpedia
Advertisement
Wowpedia
240,483
pages

Returns the dimensions of a region using the coordinate system (scale) of that region.

width = region:GetWidth();
height = region:GetHeight();
width, height = region:GetSize();

Returns

width 
Number - Width of the region in its own coordinate space (scaling dependent)
height 
Number - Height of the region in its own coordinate space (scaling dependent)

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

  • The width and height may have been set manually using Region:SetWidth(width) and Region:SetHeight(height), or it may be computed from two or more anchor points using Region:SetPoint(...)
  • FontString, a particular subclass of Region, may also expand and shrink to contain its text unless the width and height were explicitly defined using the same methods as other regions.

See Also

Advertisement