OnDgsComboBoxSelect: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
function onSelected(previous,current) | function onSelected(previous,current) | ||
outputChatBox("Last Selection:"..(previous or "None").." ; | outputChatBox("Last Selection:"..(previous or "None")..";Current Selection:"..(current or "None")) | ||
end | end | ||
addEventHandler("onClientDgsDxComboBoxSelect",getRootElement(),onSelected) | addEventHandler("onClientDgsDxComboBoxSelect",getRootElement(),onSelected) |
Revision as of 10:13, 11 November 2017
This event is fired when the item of a DGS combo box is selected.
Parameters
integer previous, integer current
- previous: The item id that last selected.
- current: The item id that got selected.
Source
The source of this event is the combo box element that got its item selected.
Example
This example outputs a message with the selected item when an item is selected.
DGS = exports.dgs comboBox = DGS:dgsDxCreateComboBox(500,400,200,30,false) for i=1,20 do DGS:dgsDxComboBoxAddItem(comboBox ,i) end function onSelected(previous,current) outputChatBox("Last Selection:"..(previous or "None")..";Current Selection:"..(current or "None")) end addEventHandler("onClientDgsDxComboBoxSelect",getRootElement(),onSelected)
See Also
DGS events
General
- onDgsBlur
- onDgsCreate
- onDgsCursorTypeChange
- onDgsCursorStateChange
- onDgsDestroy
- onDgsElementRender
- onDgsElementMove
- onDgsElementSize
- onDgsElementEnter
- onDgsElementLeave
- onDgsFocus
- onDgsKey
- onDgsPositionChange
- onDgsPreRender
- onDgsRender
- onDgsElementScroll
- onDgsSizeChange
- onDgsTextChange
- onDgsWindowClose
- onDgsPropertyChange
Check Box
Combo Box
Drag'N Drop
Edit
Grid List
Menu
Selector
Mouse
- onDgsMousePreClick
- onDgsMouseClick
- onDgsMouseClickDown
- onDgsMouseClickUp
- onDgsMouseDrag
- onDgsMouseDoubleClick
- onDgsMouseDoubleClickDown
- onDgsMouseDoubleClickUp
- onDgsMouseDown
- onDgsMouseHover
- onDgsMouseEnter
- onDgsMouseLeave
- onDgsMouseMultiClick
- onDgsMouseMove
- onDgsMouseStay
- onDgsMouseUp
- onDgsMouseWheel
Radio Button
Switch Button
Tab
Animation
Plugin
Media
- onDgsMediaPlay
- onDgsMediaPause
- onDgsMediaStop
- onDgsMediaLoaded
- onDgsMediaTimeUpdate
- onDgsMediaBrowserReturn
Color Picker
QRCode
Remote Image
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled