• How to remove this small part in the DPanelList ?
    1 replies, posted
I need to remove this in this PanelList how ? Thanks. [img]http://img813.imageshack.us/img813/7325/testku.jpg[/img] [lua]if CLIENT then function Paneltest() DermaPanel = vgui.Create( "DFrame" ) -- Creates the frame itself DermaPanel:SetPos( 50,140 ) -- Position on the players screen DermaPanel:SetSize( 190, 220 ) -- Size of the frame DermaPanel:SetTitle( "DSP" ) -- Title of the frame DermaPanel:SetVisible( true ) DermaPanel:SetDraggable( false ) -- Draggable by mouse? DermaPanel:ShowCloseButton( true ) -- Show the close button? DermaPanel:MakePopup() -- Show the frame DermaPanel.Paint = function() surface.SetDrawColor( 130, 130, 130, 255 ) surface.DrawRect(0 , 0, DermaPanel:GetWide(), DermaPanel:GetTall() ) surface.SetDrawColor( 0, 0, 0, 255 ) surface.DrawOutlinedRect( 0, 0, DermaPanel:GetWide(), DermaPanel:GetTall()) end local ForeGroundPanel = vgui.Create( "DPanel", DermaPanel ) ForeGroundPanel:SetPos( 8, 23 ) ForeGroundPanel:SetSize( DermaPanel:GetWide() - 40, DermaPanel:GetTall() - 31 ) ForeGroundPanel.Paint = function() -- Paint function surface.SetDrawColor( 50, 50, 50, 255 ) -- Set our rect color below us; we do this so you can see items added to this panel surface.DrawRect( 0, 0, ForeGroundPanel:GetWide(), ForeGroundPanel:GetTall() ) -- Draw the rect end local SideGroundPanel = vgui.Create( "DPanel", DermaPanel ) SideGroundPanel:SetPos( 163, 23 ) SideGroundPanel:SetSize( 21, 189 ) SideGroundPanel.Paint = function() -- Paint function surface.SetDrawColor( 130, 130, 130, 255 ) -- Set our rect color below us; we do this so you can see items added to this panel surface.DrawRect( 0, 0, SideGroundPanel:GetWide(),SideGroundPanel:GetTall()) -- Draw the rect end local SomeCollapsibleCategory = vgui.Create("DCollapsibleCategory", ForeGroundPanel) SomeCollapsibleCategory:SetPos( 2,2 ) SomeCollapsibleCategory:SetSize( ForeGroundPanel:GetWide() - 5, ForeGroundPanel:GetTall() ) SomeCollapsibleCategory:SetExpanded( 1 ) -- Expanded when popped up SomeCollapsibleCategory:SetLabel( " Test" ) CategoryList = vgui.Create( "DPanelList" ) CategoryList:SetAutoSize( true ) CategoryList:SetSpacing( 5 ) CategoryList:EnableHorizontal( false ) CategoryList:EnableVerticalScrollbar( true ) SomeCollapsibleCategory:SetContents( CategoryList ) -- Add our list above us as the contents of the collapsible category local DList = vgui.Create ( "DListView" ) DList:SetPos(-200, 0) DList:SetSize(100, 100) DList:AddColumn("") DList:AddLine("testing") DList:AddLine("Test") DList:AddLine("NotATest") CategoryList:AddItem( DList ) -- Add the above item to our list BtnAdd = vgui.Create("DImageButton", SideGroundPanel) BtnAdd:SetMaterial( "gui/silkicons/add" ) BtnAdd:SetPos( 2,30 ) BtnAdd:SizeToContents() BtnAdd.DoClick = function() Msg("You clicked the button!\n") end end concommand.Add("testPanel",Paneltest) end[/lua]
[b][url=http://wiki.garrysmod.com/?title=DPanelList.RemoveItem]DPanelList.RemoveItem [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Sorry, you need to Log In to post a reply to this thread.