GuiScrollPaneGetHorizontalScrollPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Undo revision 55032 by LordHenry (talk))
Tag: Undo
Line 28: Line 28:
==See Also==
==See Also==
{{GUI_functions}}
{{GUI_functions}}
{{GUI_events}}

Revision as of 01:49, 27 September 2019

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

Syntax

float guiScrollPaneGetHorizontalScrollPosition ( element horizontalScrollPane )

Required Arguments

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

Returns

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

Example

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

if ( myScrollPane ) then -- if the scroll pane exist then
        -- get the position
	local position = guiScrollPaneGetHorizontalScrollPosition( 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

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows