Garry's Mod Wiki

Revision Difference

PanelList#516754

<panel> <parent>Panel</parent> <description> A panel list with a custom vertical scroll bar that doesn't have up/down buttons and has a momentum to scrolling. <deprecated>You should use <page>DScrollPanel</deprecated> instead</page> </description> <hooks></hooks>⤶ ⤶ </panel>⤶ ⤶ ⤶ <example>⤶ <hooks>⤶ }}⤶ {{Example⤶ </hooks>⤶ <description>Example usage of the panel</description> <code> local frame = vgui.Create( "DFrame" ) frame:SetSize( 300, 500 ) frame:Center() frame:MakePopup() local pnl = frame:Add( "PanelList" ) pnl:Dock( FILL ) pnl:EnableVerticalScrollbar() for i = 0, 100 do local button = pnl:Add( "DButton" ) pnl:AddItem( button ) end </code> ⤶ </example>⤶ ⤶ </panel>⤶