• Customize RichText's Scrollbar
    2 replies, posted
Hi guys! I'm SmOkEwOw. I were making a chatbox addon for my server when I got this problem: [B]I need to customize my RichText's scrollbar.[/B] I tried to look on google, wiki and forums but didn't get any solution. DScrollPanel:GetVBar() will not work. I can't parent a DScrollPanel to the richtext. Don't know what to do else. [B]I need a way to change the way the default richtext's scrollbar looks.[/B] I will appreciate any help.
Best bet is to do something like this [lua]RichText.Paint = function() //stuff end[/lua] I'm not too sure myself though. [B]EDIT:[/B] nevermind that wouldn't change the color of the scrollbar
[QUOTE=KTBM;49298834]Best bet is to do something like this [lua]RichText.Paint = function() //stuff end[/lua] I'm not too sure myself though. [B]EDIT:[/B] nevermind that wouldn't change the color of the scrollbar[/QUOTE] Yes i tried that but it will just paint the rich text not the scrollbar [B]EDIT:[/B] After lot of research in stuff that have nothing related to this i have found a way to get the richtext scrollbar. [lua] local frame = vgui.Create("DFrame") frame:SetTitle("Test") frame:SetSize(300, 200) frame:Center() frame:MakePopup() local richtext = vgui.Create("RichText", frame) richtext:SetSize(250, 150) richtext:SetPos(25, 25) local scrollbar = richtext:GetChildren()[1] -- Gets the richtext scrollbar so u can paint it. [/lua]
Sorry, you need to Log In to post a reply to this thread.