How can i change the position of the checkboxses ?
They just goes into the corner :/
Heres my code
---------------------------------------------------------------------------------------------------------------------------
function testass()
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50, 50 )
DermaPanel:SetSize( 350, 400 )
DermaPanel:SetTitle( "CinemaHelper" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
-- Hiding Stuff panel
local PropertySheet = vgui.Create( "DPropertySheet" )
PropertySheet:SetParent( DermaPanel )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( 350, 400 )
local SheetItemOne = vgui.Create( "DCheckBoxLabel", PropertySheet )
SheetItemOne:SetText( "Hide Hud" )
SheetItemOne:SetConVar( "cl_drawhud" )
SheetItemOne:SetValue( 1 )
SheetItemOne:SizeToContents()
local SheetItemOne = vgui.Create( "DCheckBoxLabel", PropertySheet )
SheetItemOne:SetText( "Hide Weapon" )
SheetItemOne:SetConVar( "r_drawviewmodel" )
SheetItemOne:SetValue( 1 )
SheetItemOne:SizeToContents()
local SheetitemOne = vgui.Create( "DNumSlider", PropertySheet )
SheetitemOne:SetSize( 150, 50 ) -- Keep the second number at 50
SheetitemOne:SetText( "Messages" )
SheetitemOne:SetMin( 0 )
SheetitemOne:SetMax( 12 )
SheetitemOne:SetDecimals( 0 )
SheetitemOne:SetConVar( "hud_saytext_time" )
SheetItemOne:SizeToContents()
-- UseFull Commands frm here
local SheetItemTwo = vgui.Create( "DCheckBoxLabel" )
SheetItemTwo:SetText( "Test" )
SheetItemTwo:SetConVar( "sbox_proplimit" )
SheetItemTwo:SetValue( 0 )
SheetItemTwo:SizeToContents()
PropertySheet:AddSheet( "Hide Stuff", SheetItemOne, "gui/silkicons/wrench", false, false, "Here you can hide stuff !" )
PropertySheet:AddSheet( "Usefull Commands", SheetItemTwo, "gui/silkicons/check_on", false, false, "Usefull Commands !" )
end
concommand.Add( "CinemaHelptwo", testass )
---------------------------------------------------------------------------------------------------------------------------
Pic - [url]http://img138.imageshack.us/img138/7681/gmconstruct0005.jpg[/url]
Please help me :3
You need to :SetPos() on the checkboxes. The position is relative to the position of the parent.
The way a DPropertySheet is supposed to work is you make a DPanel for each tab, and then put what you want in each tab. So you'd make a "hidestuffpanel" and a "cmdpanel" and then parent their respective vgui items to that panel. Then you PropertySheet:AddSheet(thatpanel).
[QUOTE=Entoros;19631353]The way a DPropertySheet is supposed to work is you make a DPanel for each tab, and then put what you want in each tab. So you'd make a "hidestuffpanel" and a "cmdpanel" and then parent their respective vgui items to that panel. Then you PropertySheet:AddSheet(thatpanel).[/QUOTE]
Thanks !!!
Sorry, you need to Log In to post a reply to this thread.