TextFieldText$ ( textfield )
Parameters
| textfield - text field gadget |
Description
|
Returns the current text of a text field. Requires Extended language mode. Reads what the user has typed into a single-line field made with CreateTextField - the name for a saved level, a search term, a property value. It always reflects this instant's contents, so you can read it whenever you like; the usual moments are when the field's own $401 gadget-action event arrives (posted as the user edits) or when an OK button fires. Text is UTF-8, exactly as typed. If the field holds a number, convert it yourself with Int or Float - or reach for CreateSpinBox, which enforces whole numbers for you. It is the same read GadgetText performs, under the traditional field-specific name - use whichever reads better; unlike GadgetText this one insists its gadget really is a text field. Set the contents from code with SetGadgetText, and put placeholder cue text in an empty field with SetGadgetHint. See it working in the layout and controls sample and the world editor shell sample. See also: CreateTextField, GadgetText, SetGadgetText, SetGadgetHint, TextAreaText. |
Index