Garry's Mod Wiki



This is used internally - although you're able to use it you probably shouldn't.

The ContentSidebarToolbox is internally used by the ContentSidebar and is used to change the icon of a category. It internally consists of a DTextEntry, DPanel, DImageButton, Panel, ContentHeader and a DIconBrowser


Derives methods, etc not listed on this page from DDrawer.


Implements or overrides the following hooks/methods. If you want to override these, you probably want to call the original function too.


How to create a

Frame = vgui.Create("DFrame") Frame:SetSize(ScrW() / 2, ScrH() / 2) Frame:Center() Frame:MakePopup() ContentSidebar = vgui.Create( "ContentSidebar", Frame) ContentSidebar:Dock(FILL) ContentSidebar:CreateSaveNotification() for k=1, 6 do local Node = ContentSidebar.Tree:AddNode("Example", "icon16/user.png") Node:SetHideExpander(true) Node:SetExpanded(true) Node.DoClick = function(self) hook.Call("SpawnlistContentChanged", GAMEMODE or GM) end for v=1, math.random(1, 5) do Node:AddNode("Example", "icon16/star.png") end end