OnDgsScrollBarScrollPositionChange: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Blanked the page)
Line 1: Line 1:
{{Client event}}
__NOTOC__
This event is fired when a DGS scrollbar is scrolled ( including scroll bars of scrollpane, gridlist and combobox ).


==Parameters==
<syntaxhighlight lang="lua">
element Scrolled
</syntaxhighlight>
* '''ScrollTo''':  The value of current scroll position
* '''ScrollFrom''':  The value of previous scroll position
==Source==
The [[event system#Event source|source]] of this event is the dgs scrollbar element that got scrolled.
==Example==
This example outputs a message with the new scroll position and old scroll position when a scrollbar is scrolled.
<syntaxhighlight lang="lua">
DGS = exports.dgs
function OnScroll(new,old)
outputChatBox("The new scroll position is "..new.." ( was:"..old.." )")
end
addEventHandler("onDgsScrollBarScrollPositionChange",getRootElement(),OnScroll)
</syntaxhighlight>
==See Also==
===DGS events===
{{DGSEVENTS}}
===Client event functions===
{{Client_event_functions}}

Revision as of 04:01, 1 September 2019