DarkRP f4 tabs with derma

Hi guys, I’m wanting to add some derma to some of my new F4 tabs I made.

This is the tab I added to showteamtabs.lua - It works but the derma tab is a seperate box, its not secluded inside the actual tab. How would I go about doing this?


function GM:Test()
	local TestTab = vgui.Create("DPanelList")
	TestTab:EnableVerticalScrollbar( true )
		function TestTab:Update()
			self:Clear(true)
	local test = vgui.Create("DLabel", TestTab)
	test:SetText("There are 2 different type of donator packages we offer: 
1. Coming soon 
2. Coming soon")
		test:SizeToContents()	

local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 200, 250 )
DermaPanel:SetTitle( "Testing Derma Stuff" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
 
local DermaButton = vgui.Create( "DButton" )
DermaButton:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
DermaButton:SetText( "Kill yourself" )
DermaButton:SetPos( 25, 50 )
DermaButton:SetSize( 150, 50 )
DermaButton.DoClick = function ()
    RunConsoleCommand( "kill" ) -- What happens when you press the button
end	
	end
	TestTab:Update()
	return TestTab
end