• DVScrollBar
    3 replies, posted
how do i add a DVScrollBar to this: [lua]draw.RoundedBox( 4, 5, 5, Panel:GetWide() -5, Panel:GetTall() -5, Color(50, 50, 50, 255) )[/lua] and the code snippet [lua] local Panel3 = vgui.Create( "DPanel", Frame ) Panel3:SetPos( 25, 50 ) Panel3:SetSize( 250, 250 ) Panel3.Paint = function() draw.RoundedBox( 4, 5, 5, Panel:GetWide() -5, Panel:GetTall() -5, Color(50, 50, 50, 255) ) draw.RoundedBox( 6, 10, 10, Panel:GetWide() -15, 30, Color(100, 95, 95, 255) ) end[/lua]
Search through the wikis before posting. [url]http://wiki.garrysmod.com/?title=DVScrollBar[/url]
You're not supposed to add a base derma element like that.. You would instead make a list panel, do your drawing inside the Paint() function, and then enable a vertical scrollbar. You cant just make a scrollbar, it wont actually scroll..
Alright, thanks for the help kopimi.
Sorry, you need to Log In to post a reply to this thread.