text | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Synonyms | textdata | ||||||
Associations | field, button, image | ||||||
Summary | Specifies the text contained by a button or field or the binary data in an image. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: button, image, field, string, menu Property: menuName, style, unicodeText, paintCompression Function: target Glossary: property, keyword, binary file, stack menu, button menu Object: stack, button | ||||||
Description | Use the text property to work with the contents of a field, button, or image. Fields The text of a field is simply the contents of the field. You can also use the target keyword to obtain the contents of a field :
The text of a field is always returned in the native encoding. ButtonsThe text of a button is used as the button's menu contents. (A menu whose contents is the text of a button is called a button menu. ) If the button's style is not set to "menu", the setting of its text property has no effect. However, the text property can be used to store data in a button, regardless of the button's style; the text is not visible to the user unless the button is a button menu. See the menu entry for more information about the format of menu item entries in the menu button text. The text of a button is always returned in the native encoding. ImagesThe text of an image is the binary data that makes up the image. The following formats are supported: Fully Supported FormatsSetting the text to one of these formats displays the image as expected and sets the paintCompression to the correct type automatically. The data is also preserved meaning that getting the text returns the original data unchanged.
Import Only FormatsThere are also some formats that are not fully supported but can be imported. The image is converted to one of the supported formats, depending on the global paintCompression property.
These two statements are equivalent:
| ||||||
Tags | text processing |