DListView.OnMouseWheeled

From GMod Wiki

Jump to: navigation, search
Derma Control: DListView
Parent Class:DListView
Subclasses:None
Description:
Raises an event when you scroll the mouse on the listview.

Example

DescriptionPrints a message when you scroll the mouse.
Used onNewerClient.png
Code
-- The DFrame
 
Panel = vgui.Create("DFrame")
Panel:SetSize( 500, 300 )
Panel:SetTitle( "DListView Example" )
Panel:Center()
Panel:MakePopup()
 
-- The DListView
 
Listview = vgui.Create("DListView")
Listview:SetParent( panel )
Listview:SetPos( 20, 30 )
Listview:SetSize( 450, 250 )
Listview:AddColumn( "Player" )
Listview.OnMouseWheeled = function()
	print( "You have scrolled on the listview!" ) -- Prints in console that message when you scroll your mouse while hovering the listview.
end
 
 
OutputPrints "You have scrolled on the listview!" into your console when you scroll the mouse on the listview.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox