VGUI Menu Question?

I need a VGUI menu with what i like to call “Panels” i’m not sure if that’s the real name. Here lemme upload a pic real quick…

Can anyone tell me the command for coloring my so called “Panels” and what they are actually called.

For the…
local Panel? = vgui.Create( “Panel?” )

and the red and blue box will be sitting on top of the green frame basically. if you know what i mean by that.

a DPanel?

If you want to use a panel but with a different color, it looks like this:

[lua]local panel = vgui.Create(“DPanel”)
function panel:Paint()
draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 255, 0, 0 ) ) – note: change the Color argument here

And obviously you can set pos/size to whatever you want.

He means something along the lines of
local PANEL = {}

function PANEL:Init()

self:SetPos(ScrW()/2, ScrH()/2)
//etc etc


function PANEL:PerformLayout()

//Layout for all objects here yada yada



I thought Dpanel was for Derma… so Teddi is probably the closest

And what do you mean by //Layout for all objects here yada yada?

DPanel is for derma. However Panels also use it.

And for the layout I mean the position of say, DLabels, e.g.

[lua]function PANEL:PerformLayout()
MyLabel:SetPos(100,100) // We haven’t actually made a label yet as such, it’s just here for examplar reasons.

Here’s a basic Derma tutorial, which will probably be easier for you.

Nah i’ve done derma before and im working on learning vgui now
and one last question, how come you SetPos on both of them? one using coordinates and other using ScrH