guiMemoSetVerticalScrollPosition | Multi Theft Auto: Wiki Skip to content

guiMemoSetVerticalScrollPosition

Client-side
Server-side
Shared

Pair: guiMemoGetVerticalScrollPosition

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

OOP Syntax Help! I don't understand this!

  • Method:gui-memo:setVerticalScrollPosition(...)
  • Variable: .verticalScrollPosition

Syntax

bool guiMemoSetVerticalScrollPosition ( ​gui-memo theMemo, ​float position )
Required arguments
  • theMemo: The memo you want to change the vertical scroll position of.
  • position: A float ranging between 0 and 100.

Returns

Returns true if the scroll position was set, false otherwise.

  • bool: result

Code Examples

client

This example sets the scroll position of a memo called "theMemo" created with guiCreateMemo, and outputs it to the chatbox.

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

See Also

GUI Functions