Property
|
JavaScript
|
Type
|
Description
|
||
Enable State-Based Formatting
|
enableStateFormatting
|
boolean
|
Allows you to format the widget based on state definitions that have been defined in ThingWorx.
If the checkbox is selected the following properties appear:
• Dependent Field
• State Definition
For example, if a label has a State Definition value of error, the label turns red.
For more information about style and state definitions in ThingWorx, see Style and State Definitions in the ThingWorx Help Center.
|
||
Dependent Field
|
stateFormatValue
|
string
|
This property is visible if the Enable State-Based Formatting checkbox is selected. For more information about style and state definitions in ThingWorx, see Style and State Definitions in the ThingWorx Help Center.
|
||
State Definition
|
stateFormat
|
boolean
|
This property is visible if the Enable State-Based Formatting checkbox is selected. For more information about style and state definitions in ThingWorx, see Style and State Definitions in the ThingWorx Help Center.
|
||
Wrap Label Text
|
wrap
|
boolean
|
When this checkbox is selected, the label text is allowed to wrap.
|
Minimum Steps Required for Use
|
What It Looks Like
|
||
1. Drag and drop a Label widget onto the canvas. For this example, we’ve placed labels in cells of a Grid Layout widget.
2. Enter the text you want displayed in the Text field.
|
|
|
Keep in mind that it’s best to give your classes unique names so they do not conflict with other classes or OOTB properties.
|
CSS Example
|
What It Looks Like
|
.ptc-label {
font-size: 16px; font-family: Century Gothic; font-weight: bold; color: Red; }; |