unicodeLabel

Specifies the UTF-16 string 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: 5.5 Security:

# Syntax

set the unicodeLabel of object to labelString

# Examples

set the unicodeLabel of button 1 to tUnicodeString

get the unicodeLabel of button "Choices Popup"

set the unicodeLabel of button 1 to uniEncode("Click here")

# Description

Use the unicodeLabel property as a user-visible replacement for an ungainly name, or to change the visible name of an object when changing the actual name would require changing code that refers to it.

Setting the unicodeLabel property of an object displays a UTF-16 string as a user-visible label.

If a button's menuMode is either "option" or "comboBox", the button's unicodeLabel is the text of the currently selected menu option. Setting the unicodeLabel property changes the currently selected option. (To change the currently selected option while sending the appropriate message, set the button's menuHistory instead.)

To create a multiple-line label for a button or graphic, place a return constant in the unicodeLabel.

If an object's unicodeLabel or label is empty, the object's name property is displayed instead.

>*Important:* This property should not be used in new code; simply set the label as normal. Assigning values other than those returned from uniEncode to this property will not produce the desired results. The following are now equivalent:

set the unicodeLabel of button 1 to tText set the label of button 1 to textDecode(tText, "UTF16")

# Tags

ui,

# See

- **keyword:** effective - **property:** label, encoding, menuHistory