API:TextEditBoxSetHandleKeyDown
From RoR Wiki
UI Lua API · TextEditBox functions
Version: WAR 1.4.8
Sets whether a TextEditBox handles key presses.
TextEditBoxSetHandleKeyDown(editBoxName, handle)
Arguments
- editBoxName
string– Name of a TextEditBox window.- handle
boolean–trueto let the box process keys,falseto make it ignore them.
Returns
Nothing.
Details
- With
false, the box does nothing when a key is pressed while it has focus: no typing, no caret movement, no deleting, no clipboard shortcuts and no history browsing. The key press is reported as not handled. handlemust be a real boolean.- The error messages name
LuaSetHandelKeyDown(sic), not this function. - The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.
- The stock UI never calls this function.
Errors
Error in function call 'LuaSetHandelKeyDown': Window %s does not existError in function call 'LuaSetHandelKeyDown': Window %s is not a TextEditBox
Example
A minimal example built from the documented signature, making a box read-only for the keyboard:
TextEditBoxSetHandleKeyDown( "MyEditBox", false )
