DScrollPanel

Can someone give me an indepth explaination of how it works and how to move the content based on the scroll etc

This is how you create it:



// Self is the parent panel

local Scroll = vgui.Create( "DScrollPanel", self )
Scroll:Dock( FILL )
Scroll:DockMargin( 0, 5, 5, 5 )

local AddonList = vgui.Create( "DIconLayout", Scroll )
AddonList:SetSpaceX( 5 )
AddonList:SetSpaceY( 5 )
AddonList:Dock( FILL )
AddonList:DockMargin( 5, 5, 5, 5 )
AddonList:DockPadding( 5, 5, 5, 10 )

And this is how you add items to it:


local pnl = AddonList:Add( "MenuAddon" )
...

The rest is done automatically for you.