Search a DListView?

Hey guys,
is it possible to make a tiny search bar for a DListView?




local plylist = vgui.Create("DListView", mainpanel)
plylist:SetParent(mainpanel)
plylist:SetPos(10, 300)
plylist:SetSize(200, 125)
plylist:SetMultiSelect(false)

local clmColumn1 = plylist:AddColumn("Name")
clmColumn1:SetMinWidth(200)
clmColumn1:SetMaxWidth(200)
 
for k,v in pairs(player.GetAll()) do
    plylist:AddLine(v:Nick()) -- Add lines
end

-- The code in theory
local search = vgui.Create( "DTextEntry", mainpanel )
search:SetPos( 25, 125 )
search:SetSize( 200, 45 )
search:SetText( "Put person's name here" )
search.OnTextChanged = function( checkply ) 
  // do something in the DList to filter results
  // Loop to keep it always up to date
end




What’s the DListView for?

Listing all players and then from there I pull their playermodel. I want the search to filter out players starting with the first variable - until the user stops (max 20 characters)

http://wiki.garrysmod.com/page/DTextEntry/OnValueChange should help, update your list choosing all players having blah in the name.