DgsScrollPaneGetVerticalScrollPosition

From Multi Theft Auto: Wiki

Revision as of 11:06, 16 August 2019 by XNawaf(talk | contribs)(Created page with "{{client function}} This function is used to get the position of a vertical scroll pane as a percentage. ==Syntax== <syntaxhighlight lang="lua"> float dgsScrollPaneGetVertica...")

Required Arguments

Returns

Example

This example gets the position of a scroll pane called "myScrollPane" created with dgsCreateScrollPane, and outputs it to the chatbox.

DGS = exports.dgs
if ( myScrollPane ) then -- if the scroll pane exist then
-- get the position
local position = DGS:dgsScrollPaneGetVerticalScrollPosition( myScrollPane )
-- output to the chatbox
outputChatBox ( "Current position of scroll pane:" .. tostring(position) .. "%" )
else -- if the scroll pane was not found
outputChatBox ("scroll pane not found!")
end