Overwritting DVScrollBar paint hooks?


local p = vgui.Create( "DPanelList", frame ) 
p:SetPos( 5, 80 )	
p:SetSize( w-10, h-86 )
p:SetSpacing( 5 )	
p:EnableHorizontal( false )	
p:EnableVerticalScrollbar( false )
local VBar = vgui.Create( "DVScrollBar", p )
VBar.Paint = function()
end
VBar.btnGrip.Paint = function(VBar,w,h)
	draw.RoundedBox( 1, 0, 0, w, h, Color(52,73,94,255) )
end
VBar.btnUp.Paint = function(VBar,w,h)
	draw.RoundedBox( 1, 0, 0, w, h, Color(52,73,94,255) )		
end
VBar.btnDown.Paint = function(VBar,w,h)
	draw.RoundedBox( 1, 0, 0, w, h, Color(52,73,94,255) )		
end	

The bar is being drawn, but it is using default derma skin, and the functions aren’t called. How would I go about overwritting the scrollbar paint hooks?

Please observe:

Well that’s for dscrollpanel, solution was to do this instead of my original code, I wasn’t retrieving the right VBar


local ps = vgui.Create( "DPanelList", curs ) 
	ps:SetPos( 5, 80 )	
	ps:SetSize( w-10, h-86 )
	ps:SetSpacing( 7 )	
	ps:EnableHorizontal( false )	
	ps:EnableVerticalScrollbar( true )
	local sbar = ps.VBar
	function sbar:Paint(w, h)
		if self.Depressed or bu.m_bSelected then 
			draw.RoundedBox( 1, 0, 0, w, 25, Color(72,98,116,255) )
		elseif self.Hovered then
			draw.RoundedBox( 1, 0, 0, w, 25, Color(62,86,104,255) )
		else
			draw.RoundedBox( 1, 0, 0, w, 25, Color(52,73,94,255) )
		end
	end

Solved now none the less