guiMemoGetVerticalScrollPosition | Multi Theft Auto: Wiki Skip to content

guiMemoGetVerticalScrollPosition

Client-side
Server-side
Shared

Pair: guiMemoSetVerticalScrollPosition

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


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

OOP Syntax Help! I don't understand this!

  • Method:guimemo:getVerticalScrollPosition(...)
  • Variable: .verticalScrollPosition

Syntax

float guiMemoGetVerticalScrollPosition ( gui-memo theMemo )
Required Arguments
  • theMemo: the memo you want to know the vertical scroll position of.

Returns

  • float: value

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

Code Examples

shared

This example gets the position of a memo called "theMemo" created withguiCreateMemo, and outputs it to the chatbox.

local theMemo = guiCreateMemo( 0, 0, 200, 100, [[Insert
some
long
text
here]], false )
if ( theMemo ) then
local position = guiMemoGetVerticalScrollPosition( theMemo )
outputChatBox( "Current scroll position of the memo: " .. position .. "%" )
else
outputChatBox( "Memo not found!" )
end

See Also

GUI Functions