guiEditSetReadOnly | Multi Theft Auto: Wiki Skip to content

guiEditSetReadOnly

Client-side
Server-side
Shared

Pair: guiEditIsReadOnly

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function allows you to set or remove read-only status for an edit box. If read-only is set to true, the box is not editable.

Syntax

guiEditSetReadOnly ( )

Code Examples

client

This example creates a little advert field on the bottom right corner of the screen and sets it to read only.

myWebsite = "development.mtasa.com" -- define the text to be displayed in advert field
function createAdvert( )
local advert = guiCreateEdit( 0.845, 0.94, 0.15, 0.05, myWebsite, true ) -- create edit field for the advert
if advert then -- if it was successfully created
guiEditSetReadOnly( advert, true ) -- make it read only
end
end
addEventHandler ( "onClientResourceStart", getResourceRootElement( getThisResource() ), createAdvert )

See Also

GUI Functions