GuiMemoSetReadOnly

From Multi Theft Auto: Wiki
Revision as of 17:23, 20 January 2014 by Tosfera (talk | contribs) (→‎Example)
Jump to navigation Jump to search

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

addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource() ), -- only execute the code when this resource restarts
	function ()
		memo = guiCreateMemo ( 0.4, 0.4, 0.2, 0.2, "This is a memo.", true ); -- create an absolute memo
		guiMemoSetReadOnly ( memo, true ); -- make it read only, players wont be able to edit it ingame
	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