Specifies the string shown in a stack window title bar, or a text label to be displayed on the specified object if its showName property is true.
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
set the label of object to labelString
# Examples
set the label of button 1 to "Hello" & return & "World"
get the label of button "Choices Popup" -- current menu choice
set the label of this stack to the short name of this card
# Description
Use the label property as a user-visible replacement for an ungainly name, or to change the visible name of a window or object when changing the actual name would require changing code that refers to it.
If a button's menuMode is either "option" or "comboBox", the button label is the text of the currently selected menu option. Setting the label property changes the currently selected option. (To change the currently selected option while sending the appropriate message, set the button menuHistory instead.)
If an object's label is empty, the object name property is displayed instead. In this case, the expression the effective label of button reports the button's name property.
>*Note:* Card numbers will not be displayed in the title bar of a > stack if its label property is not empty.
# Tags
ui,
# See
- **keyword:** string, effective - **property:** name, showName, longWindowTitles, unicodeTitle, acceleratorText, menuHistory, titleWidth - **command:** constant - **function:** stacks - **glossary:** object, property, title bar, message, stack window, group, expression - **object:** graphic, button