Create a label

Create a label that displays temperature in a format adjusted to the locale of a logged-in user.
  1. In the
    Project view
    pane, right-click
    MainWindow (type)
    and select
    New
    Base controls
    Label
    .
  2. Create a label variable:
    1. In the
      Properties
      pane, at the top, select
      Add
      and select
      Analog variable
      .
    2. Create a complex dynamic link between the
      AnalogVariable1
      property and the actual
      AnalogVariable1
      variable by using binding mode.
      DynamicLink
      ProjectName
      Model
      AnalogVariable1
      Binding mode between Source and Parent engineering unit
      Set Parent localized engineering unit.
  3. Create a complex dynamic link between the
    Text
    and
    AnalogVariable1
    with the use of a string formatter:
    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.
Fornire un feedback
Hai domande o feedback su questa documentazione? invia il tuo feedback qui.