Create a label

Create a label that displays temperature in a format adjusted to the locale of a logged-in user.
  1. In
    Project view
    pane, right-click
    MainWindow (type)
    and select
    New
    Base controls
    Label
    .
  2. Create a label variable:
    1. In
      Properties
      , at the top, select
      Add icon in black
      and select
      Analog variable
      .
    2. Create a complex dynamic link between the
      AnalogVariable1
      property and the actual
      AnalogVariable1
      variable by using
      EU Mode
      Localize
      .
      Dynamic link configuration for AnalogVariable1 with EU Mode menu expanded and
                  Localize option selected.
      DynamicLink
      ProjectName
      Model
      AnalogVariable1
      Settings icon
      Configure
      EU Mode
      Localize
  3. Create a complex dynamic link between the
    Text
    and
    AnalogVariable1
    with the use of a string formatter:
    String formatter node with two dynamic links: one referencing AnalogVariable1 and
              the other referencing its EngineeringUnits DisplayName. The format field combines both
              values using the pattern "{0} {1}".
    StringFormatter1
    {0} {1}
    {0} DynamicLink
    ProjectName
    UI
    MainWindow (type)
    TemperatureLabel
    AnalogVariable1
    {1} DynamicLink
    ProjectName
    UI
    MainWindow (type)
    TemperatureLabel
    AnalogVariable1
    EngineeringUnits
    DisplayName
    For more information about dynamic links, see Create dynamic links.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal