DListView.GetLine

From GMod Wiki

Jump to: navigation, search
Function
Syntax DListView:GetLine( Integer )
Description:
Retrieves the DListView_Line associated with the line number.
Returns: DListView_Line
In Object: DListView
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DListView.GetLine]DListView.GetLine [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGets the Table from a DListView, then for each object, gets the Line and prints it as well as the value in the second (ID:1) column.
Used onNewerClient.png
Code
local mlist = maplist:GetLines()
for i=1, #mlist do
	local l2 = maplist:GetLine(i)
	print(tostring(l2))
	print(tostring(l2:GetValue(1)))
end
Output

Panel: 02D8D278
cs_assault
Panel: 02DA44F8
cs_compound
Panel: 02AEB738
cs_havana
Panel: 02D0A898
cs_italy
Panel: 02D42D58
cs_militia
Panel: 02D16378
cs_office
Panel: 02D0ADD8
cs_office_extended_gm
Panel: 02B8B0B8
cs_parkhouse
Panel: 02D81A18
de_aztec
Panel: 02D9CF38
de_cbble
Panel: 02D90B78
de_chateau
Panel: 02D82938
de_dust
Panel: 02D9A838
de_dust2
Panel: 02DB71B8
de_inferno
Panel: 02D7FE38
de_nuke
Panel: 02D2C938
de_piranesi
Panel: 02B5DF78
de_port
Panel: 02DAB938
de_prodigy
Panel: 02D45778
de_tides
Panel: 02D03778
de_train
Panel: 02D52238
zm_backwoods_b4
Panel: 02CFC818
zs_storm_v1
Panel: 02D40E98
zs_stormier_v1
Panel: 02D843D8
zs_the_citadel
Panel: 02B79D18
zs_thecity
Panel: 02D4D158
zs_tomshouse
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox