Returns the dimensions of a region using the coordinate system (scale) of that region.
width = region:GetWidth(); height = region:GetHeight(); width, height = region:GetSize();
- Number - Width of the region in its own coordinate space (scaling dependent)
- Number - Height of the region in its own coordinate space (scaling dependent)
myAddonOptionsParent = myAddonOptions:GetParent(); myAddonOptions:SetHeight(myAddonOptionsParent:GetHeight() / 2);
- The frame named "myAddonOptions" would be set to half the height of its parent frame.
- 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.
- Region:SetSize(width, height) - Shorthand to set both the width and height simultaneously
- Region:GetRect() - Also returns the distance from the lower-left screen corner
- FontString:GetStringWidth() - Returns the width necessary for a FontString to eliminate word wrap
- FontString:GetUnboundedStringWidth() - Returns the width necessary for a FontString to eliminate word wrap and truncation
- FontString:GetWrappedWidth() - Returns the width necessary for a FontString to maintain its shape after word wrap and truncation