Error getting tags :
error 404Error getting tags :
error 404 text | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle

set the text of {button | field | image} to string

See Also
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
None required
Specifies the text contained by a button or field or the binary data in an image.

put the text of button "Popup" into menuContents
set the text of field "Display Script" to the script of the target

Additional Comments
Expander triangle

Use the text property to work with the contents of a field, button, or image.


The text of a field, button, or image is a string.


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 the target is target

-- evaluates to true if target is a field

The 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 keyword entry for more information about the format of menu item entries in the menu button text.

The text of an image is the binary data that makes up the image.

Note: Indeed, it is odd to be calling binary data the "text" property. The usage came about for historical reasons.

These two statements are equivalent:

set the text of object to string

put string into object

Tip: Instead of displaying a button's text when using the button as a menu, you can designate a stack to be displayed as the menu contents. This type of menu is called a stack menu. If the button'smenuNameproperty is not empty, the stack specified by the menuName is used as the menu contents, instead of the button'stextproperty.

User Comments
Expander triangle