Numeric Label
Component Palette Icon
This component is a specialized label designed to display a number. It can include units, and has an integrated number format string. By default the number is displayed bold and the units are not. This can be customized, see the Prefix and Suffix expert properties. This label's text is constructed as follows:
Prefix + numberFormat (Value, Pattern) + Suffix + Units
It is important to note that you could customize the standard Label component using custom properties and bindings to mimic this component exactly. If this component doesn't do something that you need, you can make your own numeric label and use it everywhere in your project.
Properties
Name | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Antialias | Draw with antialias on? Makes text smoother. | boolean | .antialias | Appearance |
Background Color | The background color of the component. | Color | .background | Appearance |
Border | The border surrounding this component. NOTE that the border is unaffected by rotation. | Border | .border | Common |
Cursor | The mouse cursor to use when hovering over this component. | int | .cursorCode | Common |
Data Quality | The data quality code for any tag bindings on this component. | int | .dataQuality | Data |
Disabled Image Path | The relative path of the image to be displayed when this component is not enabled. | String | .disabledPath | Appearance |
Enabled | If disabled, a component cannot be used. | boolean | .componentEnabled | Common |
Fill Background | If true, the label's background color will be drawn. If false, it will have a transparent background. | boolean | .fillBackground | Appearance |
Font | Font of text on this component. | Font | .font | Appearance |
Foreground Color | The foreground color of the component. | Color | .foreground | Appearance |
Horizontal Alignment | Determines the alignment of the label's contents along the X axis. | int | .horizontalAlignment | Layout |
Horizontal Text Position | Determines the horizontal position of the label's text, relative to its image. | int | .horizontalTextPosition | Layout |
Icon-Text Spacing | The space (in pixels) between the icon (if any) and the text (if any). | int | .iconTextGap | Appearance |
Image Path | The relative path of the image. | String | .path | Appearance |
Mouseover Text | The text that is displayed in the tooltip which pops up on mouseover of this component. | String | .toolTipText | Common |
Name | The name of this component. | String | .name | Common |
Number Format Pattern | The number formatting string used to format the value. | String | .pattern | Appearance |
Prefix | A string that will be placed before the number. | String | .prefix | Data |
Rotation | The angle of rotation in degrees. | int | .rotation | Appearance |
Styles | Contains the component's styles. | Dataset | .styles | Appearance |
Suffix | A string that will be placed after the number, and before the units. | String | .suffix | Data |
Text | Full text of the label including the units. (Read only. Usable in bindings and scripting.) | String | .text | Uncategorized |
Units | The engineering units to display after the number. | String | .units | Data |
Value | The numeric value of this label. | double | .value | Data |
Vertical Alignment | Determines the alignment of the label's contents along the Y axis. | int | .verticalAlignment | Layout |
Vertical Text Position | Determines the vertical position of the label's text, relative to its image. | int | .verticalTextPosition | Layout |
Visible | If disabled, the component will be hidden. | boolean | .visible | Common |
Scripting
Scripting Functions
This component does not have scripting functions associated with it.
Extension Functions
This component does not have extension functions associated with it.
Event Handlers
Event handlers allow you to run a script based off specific triggers. See the full list of available event handlers on the Component Events page
Customizers
Examples
Numeric Label with Red Background and Percent Sign
Property Name | Value |
---|---|
Units | % |
Background Color | 255,0,0 |