OnClientGUIChanged: Difference between revisions
Jump to navigation
Jump to search
MaddDogg14 (talk | contribs) No edit summary |
m (→Example) |
||
Line 19: | Line 19: | ||
addEventHandler("onClientGUIChanged", editBox, function(element) | addEventHandler("onClientGUIChanged", editBox, function(element) | ||
outputChatBox("The box now reads: " .. guiGetText(element)) | outputChatBox("The box now reads: " .. guiGetText(element)) | ||
end) | |||
</syntaxhighlight> | |||
Or | |||
<syntaxhighlight lang="lua"> | |||
editBox = guiCreateEdit(0.3,0.1,0.4,0.1,"",true) | |||
addEventHandler("onClientGUIChanged", editBox, function() | |||
outputChatBox("The box now reads: " .. guiGetText(source)) | |||
end) | end) | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 23:54, 29 August 2012
This event is fired when a memo or an editbox has changed (either by the user or by guiSetText).
Parameters
element theElement
- theElement: The element which was changed.
Source
The source of this event is the element which was changed.
Example
This example creates an editbox and prints a message when it has changed
editBox = guiCreateEdit(0.3,0.1,0.4,0.1,"",true) addEventHandler("onClientGUIChanged", editBox, function(element) outputChatBox("The box now reads: " .. guiGetText(element)) end)
Or
editBox = guiCreateEdit(0.3,0.1,0.4,0.1,"",true) addEventHandler("onClientGUIChanged", editBox, function() outputChatBox("The box now reads: " .. guiGetText(source)) end)
See Also
GUI events
Input
GUI
- onClientGUIAccepted
- onClientGUIBlur
- onClientGUIChanged
- onClientGUIClick
- onClientGUIComboBoxAccepted
- onClientGUIDoubleClick
- onClientGUIFocus
- onClientGUIMouseDown
- onClientGUIMouseUp
- onClientGUIMove
- onClientGUIScroll
- onClientGUISize
- onClientGUITabSwitched
- onClientMouseEnter
- onClientMouseLeave
- onClientMouseMove
- onClientMouseWheel
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled