DListView

From GMod Wiki

Revision as of 11:48, 1 September 2011 by EthanTheGreat (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Derma Control: DListView
Parent Class:Panel
Subclasses:DListView_Column, DListView_Line
Description:
A data view with lines and columns.

Examples

DescriptionCreate a list of strings to be used with.
Used onNewerClient.png
Code
 
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 500, 700 )
DermaPanel:SetTitle( "Testing Derma Stuff" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
 
local DermaListView = vgui.Create("DListView")
DermaListView:SetParent(DermaPanel)
DermaListView:SetPos(25, 50)
DermaListView:SetSize(450, 625)
DermaListView:SetMultiSelect(false)
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
 
OutputScoreboard.png


Methods

NewerClient.png DListView.AddColumn
NewerClient.png DListView.AddLine
NewerClient.png DListView.Clear
NewerClient.png DListView.ClearSelection
NewerClient.png DListView.ColumnWidth
NewerClient.png DListView.DataLayout
NewerClient.png DListView.DoDoubleClick
NewerClient.png DListView.FixColumnsLayout
NewerClient.png DListView.GenerateExample
NewerClient.png DListView.GetCanvas
NewerClient.png DListView.GetDataHeight
NewerClient.png DListView.GetDirty
NewerClient.png DListView.GetDrawBackground
NewerClient.png DListView.GetHeaderHeight
NewerClient.png DListView.GetInnerTall
NewerClient.png DListView.GetLine
NewerClient.png DListView.GetLines
NewerClient.png DListView.GetMultiSelect
NewerClient.png DListView.GetSelected
NewerClient.png DListView.GetSelectedLine
NewerClient.png DListView.GetSortable
NewerClient.png DListView.GetSortedID
NewerClient.png DListView.Init
NewerClient.png DListView.OnClickLine
NewerClient.png DListView.OnMouseWheeled
NewerClient.png DListView.OnRequestResize
NewerClient.png DListView.OnRowRightClick
NewerClient.png DListView.OnRowSelected
NewerClient.png DListView.OnScrollbarAppear
NewerClient.png DListView.Paint
NewerClient.png DListView.PerformLayout
NewerClient.png DListView.RemoveLine
NewerClient.png DListView.SelectFirstItem
NewerClient.png DListView.SelectItem
NewerClient.png DListView.SetDataHeight
NewerClient.png DListView.SetDirty
NewerClient.png DListView.SetDrawBackground
NewerClient.png DListView.SetHeaderHeight
NewerClient.png DListView.SetMultiSelect
NewerClient.png DListView.SetSortable
NewerClient.png DListView.SortByColumn

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox