Creation of element:
Code: Select all
element.add({ type="textfield", name="test", style=style, text = "0", caption ="1" })
--element.test.caption is "1"
--element.test.text is ""
--the textfield on screen is empty
When user edits the textfield, the text is saved in "text" -field.
Script can read and write both fields, but only when adding value to caption -field it has visible effect on screen.
Some interesting usage.
Code: Select all
--Overwriting user inputs. Basicly "locks" textfield if used ontick.
element.test.caption = element.test.caption