Search

User Manual

Getting Started


Modules and Platform


Appendix


Tutorials & Helpful Tricks


Glossary


Strategic Partner Links

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

Resources

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

All Manual Versions

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata


General

Component Palette Icon:


 

Description

The Label is one of the most versatile components. It can display text, images, or both. Labels are one of the most common components that you will want to add dynamic properties to. For instance, you can put an integer dynamic property of state on a Label, and then use an expression binding to bind the text to be "On" when the state=1 and "Off" otherwise. Bind the background color to be red when the state is 0, and green when the state is 1 using a property binding. Now you have a re-usable binary state indicator. While you could also use the Multi-State Indicator to achieve the same effect, the exercise is good practice for creating custom components. You can see how the flexibility of bindings and dynamic properties make the Label extremely versatile.

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 displayvalue: string
alignVerticalVertical alignment of the text withing the component (top, center, or bottom), based on the dimensions of the component. Default is top.value: string dropdown
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

Perspective Component Events

The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Perspective Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.

Examples
Example 1

PropertyValueStyle Category
props.text(Expression Binding)

"The time is : "+dateformat(now(),"h:mm a")
N/A
props.style.borderStylegrooveborder
props.style.padding12pxmargin and padding
Example 2

PropertyValueStyle Category
props.textEast Tank 2N/A
props.style.backgroundColor#FFE8CCbackground
props.style.color#0000D9text
props.style.fontWeightboldtext
props.style.textAligncentertext
props.style.padding9pxmargin and padding
props.style.borderColor#0000D9border
props.style.borderStylegrooveborder
props.style.borderRadius10pxborder
props.style.borderWidth2pxborder


  • No labels