View Single Post
03-14-18, 01:02 AM   #1
bryde
A Defias Bandit
Join Date: Mar 2018
Posts: 3
Larger childframe not overflowing parentframe

Hello everybody,
I'd like to know if it's possible to force a childframe to be "fully there" (in size) but it's texture not overflowing the boundaries of it's parentframe.
I don't have a project that requires this as of right now, but basically let's assume something like

Code:
parent = CreateFrame("Frame", nil, UIParent)
parent:SetSize(400,400)
parent:SetPoint("center")

child = CreateFrame("Frame", nil, parent)
child:SetSize(800,800)
child:SetPoint("Center")
if I set a texture for the background of the child, it'll draw the whole texture, but I'd like it to only paint within the parents boundries. I know I could work around the issue with the rectangle function and stuff, but that doesn't seem feasible in some cases. For example zoomed-in maps where you want to change the view with WASD or something, you'd have to reload the whole texture every time rather than just loading it once and manipulating it's x/y coordinates. Is there any way to do that?
  Reply With Quote