own vgui doesn't work properly

Hey guys, I have this code :

and I get this :

http://img856.imageshack.us/img856/2900/hl2201112212131213.th.jpg

Oh and this is the “adder code”
[lua]
local FList = vgui.Create( “DPanelList”,Menu )
FList:EnableVerticalScrollbar( true )
FList:EnableHorizontal( false )
FList:SetSpacing( 5 )
FList:SetPadding( 5 )
FList:SetPos(20,40)
FList:SetSize(560,320)

Test = vgui.Create(“test”)
Test:SetISize(50,50)
FList:AddItem(Test)
[/lua]

Any idea?

[lua]vgui.Create(“test”)[/lua]
I’ve never heard of a “test” panel
Also, on line 10, you got SetISize, pretty sure thats supposed to be SetSize

um, check out the code at pastebin, it is my own vgui :slight_smile: and SetSize is buggy so I add another function for setting size

[editline]25th December 2011[/editline]

You know, vgui.Register() :slight_smile:

I dont see whats wrong, You have a draw.RoundedBox thing, it draws what you asked it to.

I think he wants the box to be 50x50 and it certainly doesn’t look it from that picture.

You can’t draw outside the bounds of a panel, you’ll need to resize the panel too in your SetISize function, or when you create it. (eg Test:SetSize( 100, 100 ))