Component Palette Icon:



 


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.






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




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.




PropertyValueStyle Category
props.text(Expression Binding)

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



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