PropertySheet Help

Hi guys, I recently started to make a property sheet but, I added a ComboBox and it fills the full SheetItemOne box, even though I have the size set correct. Picture if you do not get what I meen.

[img]www.samwilki.co.uk/guihelp.png/img]

As you can see the ComboBox is the full size of my SheetItemOne, how can I fix that.

The code is.

[lua]local DermaPanel = vgui.Create( “DFrame” )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 512, 512 )
DermaPanel:SetTitle( “Wilki’s Admin Mod Control Panel” )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup() – Show the frame

local PropertySheet = vgui.Create( “DPropertySheet” )
PropertySheet:SetParent( DermaPanel )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( 500, 470 )

	local SheetItemOne = vgui.Create( "DComboBox", PropertySheet )
	SheetItemOne:SetPos( 10, 35 )
	SheetItemOne:SetSize( 200, 425 )
	SheetItemOne:SetMultiple( false )
	for _,v in ipairs(player.GetAll()) do
		SheetItemOne:AddItem(v:Name())
	end

local SheetItemTwo = vgui.Create( “DCheckBoxLabel” )
SheetItemTwo:SetText( “Use SENTs?” )
SheetItemTwo:SetConVar( “some_convar” )
SheetItemTwo:SetValue( 1 )
SheetItemTwo:SizeToContents()

PropertySheet:AddSheet( “Command Menu”, SheetItemOne, “gui/silkicons/user”, false, false, “Punishment Commands” )
PropertySheet:AddSheet( “Fun Menu”, SheetItemTwo, “gui/silkicons/group”, false, false, “Fun Commands” ) [/lua]

Try using DPanels as a base for your sheets, and add all your items to those.

[lua]
local DermaPanel = vgui.Create( “DFrame” )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 512, 512 )
DermaPanel:SetTitle( “Wilki’s Admin Mod Control Panel” )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup() – Show the frame

local PropertySheet = vgui.Create( "DPropertySheet" )
PropertySheet:SetParent( DermaPanel )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( 500, 470 )

local SheetItemOne = vgui.Create( "DPanel", SheetItemOne )
SheetItemOne:SetPos( 0, 0 )
SheetItemOne:SetSize( PropertySheet:GetWide(), PropertySheet:GetTall() )
SheetItemOne.Paint = function()
	surface.SetDrawColor( 50, 50, 50, 255 )
	surface.DrawRect( 0, 0, SheetItemOne:GetWide(), SheetItemOne:GetTall() )
end
	
local DComboBoxOne = vgui.Create( "DComboBox", SheetItemOne )
DComboBoxOne:SetPos( 10, 10 )
DComboBoxOne:SetSize( 200, 425 )
DComboBoxOne:SetMultiple( false )
for _,v in ipairs(player.GetAll()) do
	DComboBoxOne:AddItem(v:Name())
end
 
local SheetItemTwo = vgui.Create( "DPanel", SheetItemTwo )
SheetItemTwo:SetPos( 0, 0 )
SheetItemTwo:SetSize( PropertySheet:GetWide(), PropertySheet:GetTall() )
SheetItemTwo.Paint = function()
	surface.SetDrawColor( 50, 50, 50, 255 )
	surface.DrawRect( 0, 0, SheetItemTwo:GetWide(), SheetItemTwo:GetTall() )
end

PropertySheet:AddSheet( "Command Menu", SheetItemOne, "gui/silkicons/user", false, false, "Punishment Commands" )
PropertySheet:AddSheet( "Fun Menu", SheetItemTwo, "gui/silkicons/group", false, false, "Fun Commands" ) 

[/lua]