• DVScrollBar help
    2 replies, posted
So basically, I am creating a derma panel with a DVScrollBar, and Im not too sure how to make the scroll bar scroll the DLabel up or down, depending on which way the bar is dragged. Hopefully that makes sense, I want it basically to work the same way the one to the right of your screen right now does. I dont know if Lua has a function pre-built for it, or wether Ill have to make one myself. Here's my code: [url]http://pastebin.com/XFeHekDX[/url] (Ignore the mass amount of k's in the DLabel text, that's just to have text which runs off the end of the panel to see if scrolling works.)
Do you know about DScrollPanel? [url]https://wiki.garrysmod.com/page/Category:DScrollPanel[/url]
Well there's a bunch of problems in your code that i can see with trying to achieve what you ask. First off, it appears there's nothing parented to the scrollbar vgui element. Second, DVScrollBar is the actual scroll bar itself, not the panel which contains the elements. The wiki article should have told you that. [url]https://wiki.garrysmod.com/page/Category:DVScrollBar[/url] Finally, what coffee said. Use dscrollpanel.
Sorry, you need to Log In to post a reply to this thread.