OnDgsPreCreate: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Thisdp moved page OnClientDgsDxGUIPreCreate to OnDgsPreCreate)
No edit summary
Line 1: Line 1:
#REDIRECT [[OnDgsGUIPreCreate]]
{{Client event}}
__NOTOC__
This event is fired when the item of a dgs-dxgui element has been created but before finishing data calculating which is different from [[onDgsCreate]].
 
==Parameters==
None
 
==Source==
The [[event system#Event source|source]] of this event is the dgs-dxgui element that is created.
 
==Example==
This example outputs a message when a dgs-dxgui element created.
<syntaxhighlight lang="lua">
DGS = exports.dgs
 
function onCreated()
outputChatBox("A "..DGS:dgsGetType(source).." has been created")
end
addEventHandler("onDgsGUIPreCreate",getRootElement(),onCreated)
</syntaxhighlight>
 
 
==See Also==
===DGS events===
{{DGSEVENTS}}
===Client event functions===
{{Client_event_functions}}

Revision as of 13:40, 20 January 2018

This event is fired when the item of a dgs-dxgui element has been created but before finishing data calculating which is different from onDgsCreate.

Parameters

None

Source

The source of this event is the dgs-dxgui element that is created.

Example

This example outputs a message when a dgs-dxgui element created.

DGS = exports.dgs

function onCreated()
	outputChatBox("A "..DGS:dgsGetType(source).." has been created")
end
addEventHandler("onDgsGUIPreCreate",getRootElement(),onCreated)


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