Need help with DFrame!

Hello!

I try make DFrame inside DFrame!

But 2 DFrame loses focus if i clicked on first DFrame!

sample code:

2 DFrame



local PANEL = {}

function PANEL:Init()

	self:SetIsMenu(true)
	self:SetSize(ScrW() / 4,ScrH() / 2)
	self:SetPos(ScrW() - self:GetWide(),ScrH() - self:GetTall())
	self.btnMaxim:Remove()
	self.btnMinim:Remove()
	self:SetDraggable(true)
	self:SetSizable(true)
	self:SetScreenLock(true)
	self:SetDrawOnTop(true)
	self:MakePopup()

end

function PANEL:PerformLayout()

	self.btnClose:SetPos( self:GetWide() - 35, 0 )
	self.btnClose:SetSize( 31, 31 )

end

derma.DefineControl( "DMessage", "Message panel", PANEL, "DFrame" )


1 DFrame



local PANEL = {}

function PANEL:Init()

	self:SizeTo(ScrW(),ScrH(),1)
	self.btnMaxim:Remove()
	self.btnMinim:Remove()

	self.Message = vgui.Create("DImageButton",self)
	self.Message:SetImage( "icon16/email.png" )
	self.Message:SetSize(30,30)
	self.Message.MessageCount = 99
	self.Message.DoClick = function()

		if (IsValid(self.MessagePanel)) then

			self.MessagePanel:Close()

		else

			self.MessagePanel = vgui.Create("DMessage",self) or self.MessagePanel

		end

	end

end

derma.DefineControl( "DBase", "", PANEL, "DFrame" )



How i can fix that?

nevermind, now that shit work fine!