vgui menu Text

I want to have a Box inside a box with text inside the second box. Probably made no sense

|-----------------------------------------------------|
|----________________________________-----|
|—|…|----|
|—|Light Guns…|----|
|—|_______________________________|----|

-----------------------------------------------------
-----------------------------------------------------

But i have no clue how to make a frame type thing in the dpanellist thingy.

Um heres what i have so far:

self.GunsBackground = vgui.Create(“DPanelList”)
self.GunsBackground:EnableVerticalScrollbar(false)
self.GunsBackground:SetSize((self.ToolPanel:GetWide() - 10), self.ToolPanel:GetTall())
self.GunsBackground:SetPos(0, 0)
local LightTitle = vgui.create (“DPanelList”)

Then dont you have to do somthing like

self.lightTitle.Paint = function()

Then inside that table i need to put Light Guns, know clue how to make text. I am looking at someone elses and it seems liek a long way of adding text:

	local Title = "Light Guns"
	surface.SetDrawColor(50, 50, 50, 255)	
	surface.DrawRect(0, 0, self.WeaponsBackground:GetWide(), self.WeaponsBackground:GetTall())--|
	surface.SetTextColor(255, 255, 255, 255)

	surface.SetFont("Trebuchet20")						
	local TitleW, TitleH = surface.GetTextSize(Title)
	surface.SetTextPos(((self.WeaponsBackground:GetWide()*.5) - (TitleW*.5)), ((self.WeaponsBackground:GetTall()*.02) - (TitleH*.5)))
	surface.DrawText(Title)						
end

Anyone have a faster way?

If your main panel is the self.GunsBackround then this:
[lua]
local LightText = vgui.Create( “DPanel” )
LightText:SetSize( Setthis, Setthis )

local Text = vgui.Create( “DLabel”, LightText ) – Second arguments parents it to the LightText panel
Text:SetText( “Light Guns” )
Text:SetPos( Setthis, Setthis ) – Position on the LightText panel

self.GunsBackground:AddItem( LightText ) – Adds the LightText panel to the List (self.GunsBackground in this case)
[/lua]

Unless you want fancier text, then I’m afraid you would have to use surface and draw for that.