![]() |
The API is no longer being updated here until further notice. |
Sets a key on the parent to the child object.
Object:SetParentKey(parentKey)
Arguments
- parentKey
- string
Details
- This is similar to the XML
parentKeyattribute.
Example
Sets a hello key on the parent object.
local parent = CreateFrame("Frame")
local f = CreateFrame("Frame", nil, parent)
-- this is equivalent
--f:GetParent().hello = f
f:SetParentKey("hello")
Creates a texture and sets it as a shroom key on the parent object.
local f = CreateFrame("Frame", nil, UIParent)
f:SetPoint("CENTER")
f:SetSize(64, 64)
-- this is equivalent
--f.shroom = f:CreateTexture()
f:CreateTexture():SetParentKey("shroom")
f.shroom:SetAllPoints(f)
f.shroom:SetTexture("interface/icons/inv_mushroom_11")
Patch changes
Patch 10.0.0 (2022-10-25): Added.
