Create elements for controlling the current value

Create a gauge and other interface elements that display the current value and enable you to edit it.
  1. Create the current value label:
    1. In Project view, right-click MainWIndow (Type) and select New > Base controls > Label.
    2. Hover-over a gauge, select Edit, and enter CurrentValueLabel.
    3. In Properties and set Text to Current Value.
  2. Create the value gauge:
    1. Right-click MainWindow (Type) and select New > Base controls > Linear gauge.
    2. Hover-over a gauge, select Edit, and enter ValueGauge.
    3. In Properties, create a dynamic link between the Value and ProjectName > Model > ConstrainedVariable.

      For more information about dynamic links, see Create dynamic links.

  3. Set the value gauge warning zone 1:
    1. In Properties, next to Warning zones, select Add.
    2. Under WarningZone1, set Color to #f30000.
    3. Create a dynamic link between From and ProjectName > UI > MainWindow (Type) > ValueGauge > Minimum value.

      For more information about dynamic links, see Create dynamic links.

    4. Create a dynamic link between To and ProjectName > Model > ConstrainedVariable > EURange > Low limit.

      For more information about dynamic links, see Create dynamic links.

  4. Set the value gauge warning zone 2:
    1. Next to Warning zones, select Add.
    2. Under WarningZone2, set Color to #02d92d.
    3. Create a dynamic link between From and ProjectName > Model > ConstrainedVariable > EURange > Low limit.

      For more information about dynamic links, see Create dynamic links.

    4. Create a dynamic link between To and ProjectName > Model > ConstrainedVariable > EURange > High limit.

      For more information about dynamic links, see Create dynamic links.

  5. Set the value gauge warning zone 3:
    1. Next to Warning zones, select Add.
    2. Under WarningZone3, set the Color property value to #f30000.
    3. Create a dynamic link between From and ProjectName > Model > ConstrainedVariable > EURange > High limit.

      For more information about dynamic links, see Create dynamic links.

    4. Create a dynamic link between To and ProjectName > UI > MainWindow (Type) > ValueGauge > Maximum value.

      For more information about dynamic links, see Create dynamic links.

  6. Create the value label:
    1. In Project view, right-click MainWIndow (Type) and select New > Base controls > Label.
    2. Hover-over a gauge, select Edit, and enter: ValueLabel.
    3. In Properties, create a dynamic link between Text and ProjectName > Model > ConstrainedVariable.

      For more information about dynamic links, see Create dynamic links.

  7. Create the value spin box:
    1. In Project view, right-click MainWIndow (Type) and select New > Base controls > Spin box.
    2. Hover-over a gauge, select Edit, and enter: ValueSpinBox.
    3. In Properties, create a dynamic link between Value and ProjectName > Model > ConstrainedVariable.

      For more information about dynamic links, see Create dynamic links.

  8. Create the value text box:
    1. In Project view, right-click MainWIndow (Type) and select New > Base controls > Text box.
    2. Hover-over a gauge, select Edit, and enter: ValueTextBox.
    3. In Properties, create a dynamic link between Text and ProjectName > Model > ConstrainedVariable.

      For more information about dynamic links, see Create dynamic links.