Text
September 28, 2015 ยท View on GitHub
Overview
The text control is used for editing text input.
<text hint="enter value" onchange="update" />
actions.update = function (text)
end
Properties
id
Set the ID for this control so that it can be updated later. See layout library.
<text id="my_txt" />
visibility
Set the visibility state using visible or invisible or gone.
<text visibility="gone" />
text
Set the current text to be shown.
<text text="hello world" />
textalign
Set horizontal text alignment using left or center or right.
<text textalign="right" />
hint
Set the placeholder hint (text to be shown when empty).
<text hint="enter here" />
multiline
Set whether or not the control accepts multiline input (default false).
<text multiline="true" />
Styling
See the styling page for more details.
Events
onchange
Occurs when the text changes.
<text onchange="changed" />
actions.changed = function (text)
...
end
ondone
Occurs when editing ends.
<text ondone="done" />
actions.done = function (text)
...
end