Revision Difference
DListView:DoDoubleClick#513752
<function name="DoDoubleClick" parent="DListView" type="panelfunc">⤶
<ispanel>yes</ispanel>⤶
<description>Called when a line in the DListView is double clicked.</description>⤶
<realm>Client</realm>⤶
<args>⤶
<arg name="lineID" type="number">The line number of the double clicked line.</arg>⤶
<arg name="line" type="Panel">The double clicked <page>DListView_Line</page>.</arg>⤶
</args>⤶
</function>⤶
⤶
<example>⤶
<description>Demonstrates the use of this function.</description>⤶
<code>⤶
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⤶
</code>⤶
<output>⤶
The double clicked line number is printed, e.g.⤶
⤶
⤶
⤶
⤶
```⤶
Line 6 was double clicked!⤶
```⤶
⤶
</output>⤶
⤶
</example>