tes3uiTextInput⚓︎
A structure containing properties specific to text inputs.
This type inherits the following: tes3uiWidget.
Properties⚓︎
element
⚓︎
Access back to the element this widget interface is for.
Returns:
result
(tes3uiElement)
eraseOnFirstKey
⚓︎
Default: true
. If true
, clears the initial value if the first keypress is not an edit action.
Returns:
result
(boolean)
lengthLimit
⚓︎
The character limit. Inputting additional characters will not be possible if this limit has been reached. Setting this to nil
will remove the limit.
Returns:
result
(number)
Methods⚓︎
clear
⚓︎
Clears the text currently in the input. If placeholder text is specified, the text will be reset to use it.
myObject:clear()
getIsNumeric
⚓︎
Returns true
if the element is supposed to only contain numbers.
local result = myObject:getIsNumeric()
Returns:
result
(boolean)
getIsPlaceholding
⚓︎
Returns true
if the element is currently in placeholding mode.
local result = myObject:getIsPlaceholding()
Returns:
result
(boolean)
getPlaceholdingText
⚓︎
Returns the text used when placeholding.
local result = myObject:getPlaceholdingText()
Returns:
result
(string?)
setIsNumeric
⚓︎
Sets or unsets the element's numeric-only status.
myObject:setIsNumeric(numeric)
Parameters:
numeric
(boolean)
setIsPlaceholding
⚓︎
Sets or unsets the element's placeholding status. Calling this will set or clear the placeholding text if appropriate.
myObject:setIsPlaceholding(placeholding)
Parameters:
placeholding
(boolean)
setPlaceholdingText
⚓︎
Sets the element's placeholding text. If the input is currently placeholding, the element will be updated to the new text.
myObject:setPlaceholdingText(text)
Parameters:
text
(string)