DScrollPanel is a VGUI Element similar to DPanel however it has a vertical scrollbar docked to the right which can be used to put more content in a smaller area. DScrollPanels are essentially DPanels with the Scroll Bar.
If you would like to paint or edit the elements of the scrollbar use GetVBar. If you want to see if the scrollbar is visible then use the VBar.Enabled variable on the scrollbar's VBar.
Inherits the following functions from DPanel and its parents up to 3 levels deep:
Creates a DScrollPanel and adds 100 DButtons to it.
local frame = vgui.Create( "DFrame" ) frame:SetSize( 500, 500 ) frame:Center() frame:MakePopup() local DScrollPanel = vgui.Create( "DScrollPanel", frame ) DScrollPanel:Dock( FILL ) for i=0, 100 do local DButton = DScrollPanel:Add( "DButton" ) DButton:SetText( "Button #" .. i ) DButton:Dock( TOP ) DButton:DockMargin( 0, 0, 0, 5 ) end
Pages in category "DScrollPanel"
The following 9 pages are in this category, out of 9 total.