Garry's Mod Wiki

DListView:DoDoubleClick

  DListView:DoDoubleClick( number lineID, Panel line )

Description

Called when a line in the DListView is double clicked.

Arguments

1 number lineID
The line number of the double clicked line.
2 Panel line
The double clicked DListView_Line.

Example

Demonstrates the use of this function.

local DList = vgui.Create( "DListView" ) DList:SetPos( 5, 50 ) DList:SetSize( 150, 245 ) DList:AddColumn( "Player Names" ) for _, v in ipairs( player.GetAll() ) do DList:AddLine( v:Name() ) end function DList:DoDoubleClick( lineID, line ) MsgN( "Line " .. lineID .. " was double clicked!" ) end
Output: The double clicked line number is printed, e.g.
Line 6 was double clicked!