GuiMemoGetVerticalScrollPosition

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

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

Syntax

float guiMemoGetVerticalScrollPosition ( gui-memo theMemo )

OOP Syntax Help! I don't understand this!

Method: GuiMemo:getVerticalScrollPosition(...)
Variable: .verticalScrollPosition
Counterpart: guiMemoSetVerticalScrollPosition


Required Arguments

  • theMemo: the memo you want to know the vertical scroll position of.

Returns

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

Example

This example gets the 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
    local position = guiMemoGetVerticalScrollPosition( theMemo )
    outputChatBox( "Current scroll position of the memo: " .. position .. "%" )
else
    outputChatBox( "Memo 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

Input

GUI