OnDgsGridListItemDoubleClick
From Multi Theft Auto: Wiki
This event is activated each time the user double-clicks an item in the element dgs-gridlist.
Parameters
string button, string state, number itemID
- button: the name of the mouse button that the DGS element was double clicked with.
- state: the state of the mouse button. "down" or "up".
- itemID: The index of item of dgs gridlist that was double clicked.
Source
The source of this event is the DGS element that was double clicked.
Example
This example creates a list of grids and prints the items that were double-clicked:
local DGS = exports.dgs
local gridlist = DGS:dgsCreateGridList(0.4, 0.4, 0.3, 0.3, true)
local column = DGS:dgsGridListAddColumn( gridlist, "Items", 0.6 )
for i = 0, 10 do
local row = DGS:dgsGridListAddRow(gridlist)
DGS:dgsGridListSetItemText(gridlist, row, column, i)
end
addEventHandler( "onDgsGridListItemDoubleClick", root,
function(button,state,item)
if button == "left" and state == "down" then
local text = DGS:dgsGridListGetItemText(gridlist , item, column)
outputChatBox( "The number is "..text)
end
end
)
See Also
DGS events
- onDgsArrowListValueChange
- onDgsBlur
- onDgsCheckBoxChange
- onDgsComboBoxStateChange
- onDgsComboBoxSelect
- onDgsCreate
- onDgsDestroy
- onDgsEditPreSwitch
- onDgsEditSwitched
- onDgsEditAccepted
- onDgsElementRender
- onDgsElementMove
- onDgsElementSize
- onDgsFocus
- onDgsGridListItemDoubleClick
- onDgsGridListSelect
- onDgsMouseClick
- onDgsMouseClickDown
- onDgsMouseClickUp
- onDgsMouseDrag
- onDgsMouseDoubleClick
- onDgsMouseDown
- onDgsMouseEnter
- onDgsMouseLeave
- onDgsMouseMove
- onDgsMouseUp
- onDgsMouseWheel
- onDgsRadioButtonChange
- onDgsPositionChange
- onDgsPreRender
- onDgsRender
- onDgsElementScroll
- onDgsSizeChange
- onDgsTabPanelTabSelect
- onDgsTabSelect
- onDgsTextChange
- onDgsWindowClose
Plugin
Media
- onDgsMediaPlay
- onDgsMediaPause
- onDgsMediaStop
- onDgsMediaDurationGet
- onDgsMediaTimeUpdate
- onDgsMediaBrowserReturn
Color Picker
Client event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- triggerLatentServerEvent
- triggerServerEvent
- wasEventCancelled