Code | YourPanel = vgui.Create("DCollapsibleCategory", DermaPanel) -- A collapsible category
YourPanel:SetPos( 25,50 ) --Setting its position on the Derma panel
YourPanel:SetSize( 200, 50 ) -- Setting the size of the sheet
YourPanel:SetExpanded( 1 ) -- Should the drop down be dropped?
YourPanel:SetLabel( "Test Title" ) -- Set the title of drop down
CategoryList2 = vgui.Create( "DPanelList" )
CategoryList2:SetAutoSize( true ) -- Size it to automatically
CategoryList2:SetSpacing( 5 ) -- Space in between other items on the drop down
CategoryList2:EnableHorizontal( false ) -- Should there be a horizontal scroll bar?
CategoryList2:EnableVerticalScrollbar( true ) -- Should there be a vertical scroll bar?
YourPanel:SetContents( CategoryList2 ) -- Add the items to the correct drop down |