OnDgsGridListHover: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client event}} __NOTOC__ This event is triggered each time the cursor changes hovering item on grid list ==Parameters== *'''CurrentItem:''' The value of current row that...")
 
 
Line 23: Line 23:
end  
end  


addEventHandler("dnDgsGridListHover", list, function ( current, currentcolumn, previous, previouscolumn )
addEventHandler("onDgsGridListHover", list, function ( current, currentcolumn, previous, previouscolumn )
outputChatBox("The hovering item of list has been changed. ( Current: "..current.."; Previous: "..previous.." )")
outputChatBox("The hovering item of list has been changed. ( Current: "..current.."; Previous: "..previous.." )")
end)
end)

Latest revision as of 06:06, 19 January 2021

This event is triggered each time the cursor changes hovering item on grid list

Parameters

  • CurrentItem: The value of current row that the cursor is hovering on.
  • CurrentItemColumn: The value of current column that the cursor is hovering on.
  • PreviousItem: The value of previous row that the cursor was hovering on.
  • PreviousItemColumn: The value of previous column that the cursor was hovering on.

Source

The source of this event is the DGS grid list whose item hovering has just been changed.

Example

DGS = exports.dgs

local list = DGS:dgsCreateGridList (346, 163, 433, 403, false )  --Create the grid list element
local column = DGS:dgsGridListAddColumn( list, "test", 0.5 )  --Create a column in the list
for i=1,10 do
	local row = DGS:dgsGridListAddRow ( list )
	DGS:dgsGridListSetItemText ( list, row, column, tostring(i) )
end 

addEventHandler("onDgsGridListHover", list, function ( current, currentcolumn, previous, previouscolumn )
	outputChatBox("The hovering item of list has been changed. ( Current: "..current.."; Previous: "..previous.." )")
end)

See Also

DGS events

General

Check Box

Combo Box

Drag'N Drop

Edit

Grid List

Menu

Selector

Mouse

Radio Button

Switch Button

Tab

Animation

Plugin

Media

Color Picker

QRCode

Remote Image

Client event functions