GadgetText$ ( gadget )
Parameters
| gadget - gadget to read the text of |
Description
|
Returns a gadget's text - a window title, a caption, a field's contents. Requires Extended language mode. The read-back partner of SetGadgetText, and "text" means the same thing here: the title bar of a window, the caption of a label, button, group box or link label, the full contents of a text field or text area, the number shown in a spin box (as a string). Most of the time you call it when an event says the user finished something - reading the rename field when its $401 arrives, or collecting every field of a settings panel when OK is clicked. TextFieldText is this same read specialised to text fields; for ranges of a text area use TextAreaText, and for one item of a list or combo use GadgetItemText. Text is UTF-8 throughout, so what the user typed - accents, symbols and all - comes back exactly. The layout and controls sample and the world editor shell sample show the field-reading patterns this generalises. See also: SetGadgetText, TextFieldText, TextAreaText, GadgetItemText, MenuText. |
Index