Code | local DermaPanel = vgui.Create("DFrame")
DermaPanel:SetPos((ScrW() / 2) - (400 / 2), (ScrH() / 2) - (600 / 2))
DermaPanel:SetSize(370, 500)
DermaPanel:SetTitle("Isaac Newton's 3 laws of motion")
DermaPanel:SetVisible(true)
DermaPanel:SetDraggable(true)
DermaPanel:ShowCloseButton(true)
DermaPanel:MakePopup()
local lvTestList = vgui.Create("DListView", DermaPanel)
lvTestList:SetPos(10, 30)
lvTestList:SetSize(350, 460)
lvTestList:SetMultiSelect(false)
lvTestList.DoDoubleClick = function(parent, index, list)
Derma_Message(list:GetValue(2), "Text of ID " .. list:GetValue(1), "Thank you")
end
local clmColumn1 = lvTestList:AddColumn("ID")
local clmColumn2= lvTestList:AddColumn("Name")
clmColumn1:SetMinWidth(40)
clmColumn1:SetMaxWidth(40)
lvTestList:AddLine("1", "An object at rest will remain at rest unless acted on by an unbalanced force. An object in motion continues in motion with the same speed and in the same direction unless acted upon by an unbalanced force.")
lvTestList:AddLine("2", "Acceleration is produced when a force acts on a mass. The greater the mass (of the object being accelerated) the greater the amount of force needed (to accelerate the object).")
lvTestList:AddLine("3", "For every action there is an equal and opposite re-action.") |