Skip to main content
Version: 2027.02 Beta
View as Markdown

Perspective - Label

Component Palette Icon:

Description​

The Label component displays text and can be customized with a full menu of style options for the appearance of text, background, border, color, etc. You can use bindings to display additional information on the Label component.

Properties​

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
textText to display. Text can also be entered directly to the label by deep selecting the component, which enables inline editing. Changes are immediately reflected in the text property field.value: string
alignVerticalVertical alignment of the text within the component (top, center, or bottom), based on the dimensions of the component. Default is top.value: string
textStyleSets a style for the text within this label. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object
styleSets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object

Component Scripts and Events​

Further component interaction and functionality can be configured for all components through scripting and event actions. Right-click on the component or select Components from the Designer menubar to access the configuration popups for both of these options:

  • Configure Events: Accesses the Event Configuration popup where you can configure actions to run in response to events to make the component dynamic. The Events Configurations page shows how to configure events and actions on a Perspective component.

  • Configure Scripts: Accesses the Script Configuration popup where custom methods and message handlers can be added. The Scripting in Perspective section details scripting fundamentals, creating custom methods, and using message handlers.

Example​

Example 1​

PropertyValue
props.text(Expression Binding)

"The time is : "+dateformat(now(),"h:mm a")
props.style.borderStylegroove
props.style.padding12px

Example 2​

PropertyValue
props.textLorem ipsum dolor sit amet, consectetur adipiscing elit.
props.textStyle.overflowhidden
props.textStyle.whiteSpacenowrap
props.textStyle.textOverflowellipsis
props.style.borderStyledouble