API:TextEditBoxSetMaxChars
From RoR Wiki
UI Lua API · TextEditBox functions
Version: WAR 1.4.8
Sets the maximum number of characters a TextEditBox accepts.
TextEditBoxSetMaxChars(editBoxName, maxChars)
Arguments
- editBoxName
string– Name of a TextEditBox window.- maxChars
number– The new limit. Fractions are dropped.
Returns
Nothing.
Details
- If the new limit is lower than the old one, the box's current text is taken out, the box is cleared and the text is set again.
- The value is not range-checked.
- The function needs at least two arguments and only reads the last two.
Errors
These are written to the UI log; the call returns normally.
Error in function call 'TextEditBoxSetMaxChars': Window %s does not existError in function call 'TextEditBoxSetMaxChars': Window %s is not a TextEditBox
Example
From ea_guildwindow/source/guildwindowtabrecruitprofile.lua:
TextEditBoxSetMaxChars( "GWRecruitProfileDescEditBox", 64 ) ... TextEditBoxSetMaxChars( "GWRecruitProfileSummaryEditBox", 500 )
From easystem_dialogmanager/source/dialogmanager.lua:
TextEditBoxSetText( "TextEntryDlg"..dlgIndex.."TextEntry", defaultUserText ) TextEditBoxSetMaxChars( "TextEntryDlg"..dlgIndex.."TextEntry", maxChars )
