Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-12-11, 11:08 AM   #1
dreamcatcher
A Black Drake
 
dreamcatcher's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2010
Posts: 82
Parent frame?

I have made some background frames with borders. But I don't know how to make them have a parent name other then default UIParent. Don't know if I'm explaining this right.

So I will post my code and what I want to be able to do is anchor stuff to my frames ex...Recount, mini map, omen.....

Code:
local function CreateFrames()

local f = CreateFrame("Frame", "LeftFrame1", UIParent)
	f:SetWidth(405) -- Set these to whatever height/width is needed 
	f:SetHeight(145) -- for your Texture
	f:SetPoint("BOTTOMLEFT", 0, 0)
		f:SetFrameStrata("BACKGROUND")
		f:SetBackdrop(cfg.Backdrop)
		f:SetBackdropBorderColor(0,0,0)
		f:Show()

local f = CreateFrame("Frame", "MiddleFrame", UIParent)
	f:SetWidth(1120) -- Set these to whatever height/width is needed 
	f:SetHeight(145) -- for your Texture
	f:SetPoint("BOTTOM", 0, 0)
		f:SetFrameStrata("BACKGROUND")
		f:SetBackdrop(cfg.Backdrop)
		f:SetBackdropBorderColor(0,0,0)
		f:Show()

local f = CreateFrame("Frame", "RightFrame1", UIParent)
	f:SetWidth(405) -- Set these to whatever height/width is needed 
	f:SetHeight(145) -- for your Texture
	f:SetPoint("BOTTOMRIGHT", 0, 0)
		f:SetFrameStrata("BACKGROUND")
		f:SetBackdrop(cfg.Backdrop)
		f:SetBackdropBorderColor(0,0,0)
		f:Show()

end
I have tried naming the UIParent as my frame name but that dos not work.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Parent frame?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off