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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function is used to get the position of a vertical scroll pane as a percentage.

Syntax

float dgsScrollPaneGetVerticalScrollPosition ( element verticalScrollPane )

Required Arguments

  • verticalScrollPane: The scroll pane you want to know the position of

Returns

Returns a float ranging between 0 and 100, or false otherwise.

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

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D