GuiMemoSetReadOnly: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 20: Line 20:
function memo()
function memo()
memo = guiCreateMemo(500, 500, 500, 500, "This is a memo", false)-- We created a memo.
memo = guiCreateMemo(500, 500, 500, 500, "This is a memo", false)-- We created a memo.
guiMemoSetReadOnly(false, true)--We made it read only.
guiMemoSetReadOnly(memo, true)--We made it read only.
end
end
addEventHandler("onClientResourceStart", getRootElement(), memo)--We handle our memo.</syntaxhighlight>
addEventHandler("onClientResourceStart", getRootElement(), memo)--We handle our memo.</syntaxhighlight>

Revision as of 01:45, 19 November 2011

This function allows you to set or remove read-only status for a GUI memo. If read-only is set to true, the contents are not editable.

Syntax

bool guiMemoSetReadOnly ( gui-memo theMemo, bool status )

Required Arguments

  • theMemo: The memo to change read-only status of.
  • status: A boolean value indicating whether read-only is to be enabled or disabled.

Returns

Returns true if the status was successfully changed, false otherwise.

Example

function memo()
memo = guiCreateMemo(500, 500, 500, 500, "This is a memo", false)-- We created a memo.
guiMemoSetReadOnly(memo, true)--We made it read only.
end
addEventHandler("onClientResourceStart", getRootElement(), memo)--We handle our memo.

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