Thanks for the quick answer. Like I said, I'm not actively working on a project so the variable names were just chosen for easy identification.
Sadly however it's still doing what I don't want it to do
I adjusted your code to create a colortexture in the child frame and the texture is still overflowing, using all the 800x800 instead of the 400x400 window created by it's parent:
Lua Code:
local MyFrame = CreateFrame("Frame", nil, UIParent)
MyFrame:SetSize(400, 400)
MyFrame:SetPoint("CENTER", UIParent)
local MyFrameChild = CreateFrame("Frame", nil, MyFrame)
MyFrameChild:SetSize(800, 800)
MyFrameChild:SetPoint("CENTER", MyFrame)
MyFrameChild.Texture = MyFrameChild:CreateTexture()
MyFrameChild.Texture:SetAllPoints()
MyFrameChild.Texture:SetColorTexture(1,1,1)
As mentioned, fills the 800x800 (and that's perfect), but I only want it to render the 400x400px of the parent. The idea being that the full 800x800 texture is loaded into cache but only the 400x400 part is visible/rendered.