DListView/DoDoubleClick

From Garry's Mod
Jump to: navigation, search
 DListView:DoDoubleClick( )

Contents

DescriptionPanelFunc

Called when a line in the DListView is double clicked.

Arguments

number lineID

The line number of the double clicked line.

Arguments

Panel line

The double clicked DListView_Line.

Examples

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 k, v in pairs( 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!
Personal tools
Navigation