GuiMemoGetVerticalScrollPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{client function}} <!-- {{New feature/item|3.0156|1.5.5|12419|This function is used to get the vertical scroll position of a memo as a percentage.}} --> This function is used...")
 
mNo edit summary
Line 27: Line 27:
if ( theMemo ) then
if ( theMemo ) then
     local position = guiMemoGetVerticalScrollPosition( theMemo )
     local position = guiMemoGetVerticalScrollPosition( theMemo )
     outputChatBox( "Current scroll position of the memo:" .. position .. "%" )
     outputChatBox( "Current scroll position of the memo: " .. position .. "%" )
else
else
     outputChatBox( "Memo not found!" )
     outputChatBox( "Memo not found!" )

Revision as of 12:21, 22 July 2018

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

Syntax

float guiMemoGetVerticalScrollPosition ( gui-memo theMemo )

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