Wowpedia
Advertisement
Wowpedia
240,483
pages

Defines the parent object of a Region from which many properties are inherited (scale, visibility, etc.).

region:SetParent(parent)
region:SetParent("parent")

Argument

parent
  • UIObject - Direct table reference to the new parent
  • String - Name of the global reference to the new parent, as in _G["parent"]

Example

local myFrame = CreateFrame("Frame")
print(myFrame:GetEffectiveScale())         -- 1

myFrame:SetParent(UIParent)
print(myFrame:GetEffectiveScale())         -- 0.89372  (it is now inheriting UIParent's scale)

Notes

Patch changes

  • WoW Icon update.png Patch 1.11.0 / API (2006-06-19): Consolidated to Region:SetParent()[1]
  • WoW Icon update.png Patch 1.10.0 / API (2006-03-28): Added as Texture:SetParent() and FontString:SetParent()[2]
    Previously existed as Frame:SetParent()

See also

  • Frame:GetChildren() - Returns the children of a frame
  • AnimationGroup:GetAnimations() - Returns the children of an animation group

References

 
  1. ^ Blizzard Entertainment slouken 2006-05-12. Re: Upcoming 1.11 Changes - Concise List. Archived from the original on 2006-05-12.
  2. ^ Blizzard Entertainment slouken 2005-12-28. Re: Upcoming 1.10 Changes - Concise List. Archived from the original on 2005-12-28.
Advertisement