guiEditIsReadOnly | Multi Theft Auto: Wiki Skip to content

guiEditIsReadOnly

Client-side
Server-side
Shared

Pair: guiEditSetReadOnly

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 checks if an edit box is read-only.

Syntax

guiEditIsReadOnly ( )

Code Examples

client
local 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 box for the advert
if advert then -- if it was successfully created
guiEditSetReadOnly( advert, true ) -- make it read-only
end
addCommandHandler( "isReadOnly",
function( )
local readOnly = guiEditIsReadOnly( advert ) -- check edit box status
outputChatBox( "Edit box is " .. ( readOnly and "read-only" or "not read-only" ) ) -- show info about edit box
end
)
end
addEventHandler( "onClientResourceStart", resourceRoot, createAdvert )

See Also

GUI Functions