I am wondering if there is a way to extract the Highlighted Data in a DPlayerList and set it to a value. I’m trying to take the highlighted name, AFTER a button is pressed, and output it into a different list. I have all the coding I need other than the code to assign a variable to the value of the highlighted code.
local BHMPlayerList = vgui.Create("DListView")
local BHMBountyList = vgui.Create("DListView")
And when you hit the button, it takes all data, assigns it to a variable and puts it into another list.
BHMBountyList:AddLine(job, CD, amount, clientPlacingJob)****
I cant remember, and mau’s wiki is being dumb for me
local mlist = maplist:GetLines()
for i=1, #mlist do
local things = maplist:GetLine(i)
This seems like it would be good if I was trying to output the entire list, but I’m looking for the selected one only. Also it looks like someone would have to know what line is selected for it to be used singularly. Also it looks like the GetLine(x) code input has to be an integer, I’m going to be outputting Strings. I may be wrong, but it appears that it would output everything. Ill try Deadman’s suggestion in a few.
Edit: Just looked deeper into that wiki it appears I can do DListView.GetSelectedLine to get the line number then use that code to output its data. Is also apears to be the only way to get the data. Thanks for the help Freze.
When the wiki fails, those who are able to access it in these tough times for us wikimen… Must help eachother!
PeopleListView.OnRowRightClick = function(self, lineID, line)
line:GetColumnText(Column number here)
[/lua] is what I use