• DListView and DPropertySheet custom colors?
    7 replies, posted
  • Avatar of SashaWolf
  • Hello everyone. I just had a few questions relating to customizing the colors for the two derma elements listed in the title. This is what I have so far (works somewhat for DListView, no idea how to do it with DPropertySheet) [CODE] local DermaListView = vgui.Create("DListView") DermaListView:SetParent(Frame) DermaListView:SetPos(25, 50) DermaListView:SetSize(450, 500) DermaListView:SetMultiSelect(false) DermaListView.Paint = function() surface.SetDrawColor( 200, 200, 200, 255 ) surface.DrawRect( 0, 0, DermaListView:GetWide(), DermaListView:GetTall() ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.DrawOutlinedRect( 0, 0, DermaListView:GetWide(), DermaListView:GetTall() ) end DermaListView:AddColumn("Name") -- Add column DermaListView:AddColumn("Amount of kills") for k,v in pairs(player.GetAll()) do DermaListView:AddLine(v:Nick(),v:Frags()) -- Add lines end [/CODE] Here is what it looks like on a panel [IMG]http://gyazo.com/6ce39eb9167b927584138bcb2a18868c.png?1343550919[/IMG] Excuse the crappy white border, but you get the idea. I basically want to make a list view thing with a custom background, and remove or recolor the top two boxes that have "Name" and "Amount of kills" written in them. I need this not only for a menu I am working on, but to also replace DComboBox. For DPropertySheet, I tried a similar thing, and this is what happened. [IMG]http://gyazo.com/b8389f92fb38423723178e1ee69502ec.png?1343551405[/IMG] I never have been able to figure out how to color those damn tabs... :I So facepunch, am I going about this the wrong way? Is what I am trying to do impossible? Help would be appreciated! (Also, excuse me if this post sounds a little odd, been awake for over 36 hours)
  • Avatar of SashaWolf
  • [QUOTE=Wizard of Ass;36986719]Take a look into the skin file.[/QUOTE] I thought about trying something like that out. If I make some sort of a custom skin, and use it in the gui, will that set the skin for everything else? EDIT: Part of the reason I want to edit these two items' colors is because A. I want a newer look to them in my particular application, and B. I want to try and make Garry's solution for the removal of DComboBox ([url]https://docs.google.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA/edit?pli=1[/url]) I hope that makes sense.
  • Avatar of SashaWolf
  • Bump. There must be some way to recolor individual Derma items... I really would prefer not to make custom vgui elements, but it looks like that is what it is going to come to...
  • Avatar of SashaWolf
  • [QUOTE=Wizard of Ass;36999433]You can just create your own skin and apply it for certain derma elements only.[/QUOTE] I know you lot hate hand-holding, but how is this done?
  • Avatar of SashaWolf
  • [QUOTE=Wizard of Ass;37014642]Panel:SetSkin?[/QUOTE] I've been browsing the wiki for awhile now, and never came across that. That makes sense, thanks. I'll go play around with that function.