Painting DColumnSheet:AddSheet and Custom DNumSlider?

I’m in the process of making a new server with custom everything and I’m making a setting menu now and I’ve got pretty far with it. I’ve got custom comboboxes and checkboxes and now all I need are sliders.

http://puu.sh/mZ7rp/f840108025.png

This is my idea for the slider but I don’t have any idea how to make it an actual slider, at the moment it’s just two DPanels with text. Any help with this would be greatly appreciated.

I haven’t even attempted to try with the DColumnSheet:AddSheet yet as I’m completely clueless. Again, any help would be greatly appreciated.

EDIT:


local function AddSlider(k, _k)
	local y = 10 + (options[k][_k][2]-1) * 20
	
	local max = options[k][_k][5][2]
	local width = math.ceil(options[k][_k][3] * (140 - 4) / max);

	local SliderHolder = vgui.Create("DPanel", Sheets[k])
	SliderHolder:SetPos(Main:GetWide() - Info:GetWide() - 185, y)
	SliderHolder:SetSize(140, 20 - 1)

	local Slider = vgui.Create("DPanel", SliderHolder)
	Slider:SetPos(2, 2)
	Slider:SetSize(width, 20 - 5)

	SliderHolder.Paint = function(self)
		DrawRect(0, 0, self:GetWide(), self:GetTall(), Color(45,45,45))
		DrawText(options[k][_k][4], "MenuFont", self:GetWide() / 2, self:GetTall() / 2, Color(250,250,250), "c", "c")
	end

	Slider.Paint = function(self)
		DrawRect(0, 0, self:GetWide(), self:GetTall(), Color(195,195,229))
		DrawText(options[k][_k][4], "MenuFont", SliderHolder:GetWide() / 2, SliderHolder:GetTall() / 2 - 2, Color(5,5,5), "c", "c")
	end
end

This is my current “slider” code, just need to find a way to make it actually slide.

Take a look at the source code for the DNumSlider. You’ll be able to access the variables inside the panel like it’s a table and then Paint them.

For example:


theslider.Slider.Paint = function(self)
-- whatever
end

Thanks for the input but I don’t understand how you could make something like the picture provided using this, I’ve tried it already and failed.