1. Post #1
    Dennab
    May 2012
    478 Posts
    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
    Here is what it looks like on a panel


    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.


    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)

  2. Post #2
    Dragon Dildoes
    Dennab
    April 2009
    4,432 Posts
    Take a look into the skin file.

  3. Post #3
    Dennab
    May 2012
    478 Posts
    Take a look into the skin file.
    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 (https://docs.google.com/document/d/1...6gA/edit?pli=1)
    I hope that makes sense.

  4. Post #4
    Dennab
    May 2012
    478 Posts
    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...
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Disagree Disagree x 1 (list)

  5. Post #5
    Dragon Dildoes
    Dennab
    April 2009
    4,432 Posts
    You can just create your own skin and apply it for certain derma elements only.

  6. Post #6
    Dennab
    May 2012
    478 Posts
    You can just create your own skin and apply it for certain derma elements only.
    I know you lot hate hand-holding, but how is this done?

  7. Post #7
    Dragon Dildoes
    Dennab
    April 2009
    4,432 Posts
    Panel:SetSkin?

  8. Post #8
    Dennab
    May 2012
    478 Posts
    Panel:SetSkin?
    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.