• Change color on DPanelList?
    2 replies, posted
I'm trying to change color on DPanelList. I understand that DpanelList is outdated but it should still work from my knowledge. Here's sourcecode for anyone to dig in. On the last row is where i'm trying to change the background color on the DPanel, however it doesn't. I can change any other variable though such as size, position etc. local ScreenWidth, ScreenHeight = ScrW(), ScrH() FAdmin.ScoreBoard.X = ScreenWidth*0.05 FAdmin.ScoreBoard.Y = ScreenHeight*0.05 FAdmin.ScoreBoard.Width = ScreenWidth*0.9 FAdmin.ScoreBoard.Height = ScreenHeight*0.9 FAdmin.ScoreBoard.ChangeView("Main") FAdmin.ScoreBoard.Main.Controls.FAdminPanelList = FAdmin.ScoreBoard.Main.Controls.FAdminPanelList or vgui.Create("DPanelList") FAdmin.ScoreBoard.Main.Controls.FAdminPanelList:SetVisible(true) FAdmin.ScoreBoard.Main.Controls.FAdminPanelList:Clear(true) FAdmin.ScoreBoard.Main.Controls.FAdminPanelList.Padding = 3 FAdmin.ScoreBoard.Main.Controls.FAdminPanelList:EnableVerticalScrollbar(true) FAdmin.ScoreBoard.Main.Controls.FAdminPanelList:Clear(true) FAdmin.ScoreBoard.Main.Controls.FAdminPanelList:SetPos(FAdmin.ScoreBoard.X + 600, FAdmin.ScoreBoard.Y + 90) FAdmin.ScoreBoard.Main.Controls.FAdminPanelList:SetSize(FAdmin.ScoreBoard.Width - 700, FAdmin.ScoreBoard.Height - 90 - 30 - 20 - 20) FAdmin.ScoreBoard.Main.Controls.FAdminPanelList:SetBackgroundColor(Color(255,0,0,255)) config: FAdmin.ScoreBoard = {} local ScreenWidth, ScreenHeight = ScrW(), ScrH() FAdmin.ScoreBoard.X = ScreenWidth * 0.05 FAdmin.ScoreBoard.Y = ScreenHeight * 0.025 FAdmin.ScoreBoard.Width = ScreenWidth * 0.7 FAdmin.ScoreBoard.Height = ScreenHeight * 0.75 FAdmin.ScoreBoard.Controls = {} FAdmin.ScoreBoard.CurrentView = "Main" FAdmin.ScoreBoard.Main = {} FAdmin.ScoreBoard.Main.Controls = {}
Try FAdmin.ScoreBoard.Main.Controls.FAdminPanelList.pnlCanvas.SetBackgroundColor(Color(255,0,0,255))
Moved to the correct section.
Sorry, you need to Log In to post a reply to this thread.