Garry's Mod Wiki

DListView_Line:GetColumnText

  string DListView_Line:GetColumnText( number column )

Description

Gets the string held in the specified column of a DListView_Line panel.

This is the same thing as doing DListView_Line:GetValue( column_number ).

Arguments

1 number column
The number of the column to retrieve the text from, starts with 1.

Returns

1 string
The contents of the specified column.

Example

local dframe = vgui.Create("DFrame") dframe:SetSize(450, 350) dframe:Center() local dlist = vgui.Create("DListView", dframe) dlist:Dock(FILL) dlist:SetMultiSelect(false) dlist:AddColumn("Name") dlist:AddColumn("SteamID") dlist:AddLine("Stalker", "STEAM_0:1:18093014") function dlist:DoDoubleClick(linenumber, lineinfo) print(lineinfo:GetColumnText(2)) end
Output: Prints "STEAM_0:1:18093014" when the line containing Stalker is double clicked.