'LinKin Posted March 29, 2015 Share Posted March 29, 2015 Hello, How can I set a maximum of 300 characters in a guiMemo? Link to comment
xXMADEXx Posted March 29, 2015 Share Posted March 29, 2015 You can try something like this: addEventHandler ( "onClientGUIChanged", MemoElement, function ( ) local text = guiGetText ( source ); if ( string.len ( text ) > 300 ) then guiSetText ( source, string.sub ( text, 0, 300 ) ); end end ); Link to comment
Sasu Posted March 29, 2015 Share Posted March 29, 2015 I don't know if it works but you can try: guiSetProperty ( text, "MaxTextLength", "300" ) Link to comment
Ryancit2 Posted March 29, 2015 Share Posted March 29, 2015 I don't know if it works but you can try: guiSetProperty ( text, "MaxTextLength", "300" ) http://web.archive.org/web/201207060814 ... TextLength So yes, it would work fine. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now