On the back of a DListView there is a white background box.
all references to DListView below are things i'm doing on the DListView I created, not the derma control( for whatever reason someone would think that's what i'm talking about?)
DListView:SetDrawBackground(false); doesn't work
DListView.paint = function()end; doesn't work
DListView.paint = function return true; end; doesn't work
DListView.pnlCanvas.Paint = function() end; doesn't work
DListView:SetBackgroundColor( Color(0,0,0,0) ); doesn't work
I've tried fuckin everything and i've searched through the DListView lua file and still couldn't find what else to do.
Where the fuck is this white box being drawn at, how do i access it, and how do I override it's paint or at least set it's color.
Look into Skins. Notice it does a Derma_Hook( PANEL, "Paint", "Paint", "ListView" ) at the top.
[lua]SKIN.listview_hover = Color( 70, 70, 70, 255 )
SKIN.listview_selected = Color( 100, 170, 220, 255 )
SKIN.tex.Input.ListBox = {}
SKIN.tex.Input.ListBox.Background = GWEN.CreateTextureBorder( 256, 256, 63, 127, 8, 8, 8, 8 );
SKIN.tex.Input.ListBox.Hovered = GWEN.CreateTextureBorder( 320, 320, 31, 31, 8, 8, 8, 8 );
SKIN.tex.Input.ListBox.EvenLine = GWEN.CreateTextureBorder( 352, 256, 31, 31, 8, 8, 8, 8 );
SKIN.tex.Input.ListBox.OddLine = GWEN.CreateTextureBorder( 352, 288, 31, 31, 8, 8, 8, 8 );
SKIN.tex.Input.ListBox.EvenLineSelected = GWEN.CreateTextureBorder( 320, 270, 31, 31, 8, 8, 8, 8 );
SKIN.tex.Input.ListBox.OddLineSelected = GWEN.CreateTextureBorder( 320, 288, 31, 31, 8, 8, 8, 8 );
function SKIN:PaintListViewLine( panel, w, h )
if ( panel:IsSelected() ) then
self.tex.Input.ListBox.EvenLineSelected( 0, 0, w, h );
elseif ( panel.Hovered ) then
self.tex.Input.ListBox.Hovered( 0, 0, w, h );
elseif ( panel.m_bAlt ) then
self.tex.Input.ListBox.EvenLine( 0, 0, w, h );
end
end
function SKIN:PaintListView( panel, w, h )
self.tex.Input.ListBox.Background( 0, 0, w, h )
end
[/lua]
[QUOTE=LauScript;43548497]DListView.paint = function()end; doesn't work[/QUOTE]
Is this a typo or did you actually do 'paint'? (It's [B]P[/B]aint, which you did do correctly here DListView.pnlCanvas.Paint )
it was a typo, i did it correctly in file.
no, skins won't work here.( as in i don't want to use them, is there another way )
Not that I'm aware of. By the way, you know that you can use partial skins, right? In other words, you don't have to create a huge skin file to replace ALL vars. Simply change what you want.
I know there's an example of this floating out there, an MOTD..
Found it: [url]http://www.garrysmod.org/downloads/?a=view&id=112062[/url] [url]http://facepunch.com/showthread.php?t=1012738[/url]
i just made my own dlistview instead. marking as solved lol
Sorry, you need to Log In to post a reply to this thread.