Create the interface elements

Create a linear gauge, a button, and a data grid.
  1. Create a linear gauge:
    1. In the
      Project view
      pane, right-click
      MainWindow (type)
      and select
      New
      Base controls
      Linear gauge
      .
    2. In the
      Properties
      pane, create a dynamic link between
      Value
      and
      ProjectName
      Model
      Variable1
      .
      For more information about dynamic links, see Create dynamic links.
  2. Create a data grid:
    1. In the
      Project view
      pane, right-click
      MainWindow (type)
      and select
      New
      Data controls
      Data grid
      .
    2. In the
      Properties
      pane, create a dynamic link between the
      Model
      variable and
      ProjectName
      DataStores
      EmbeddedDatabase1
      .
    3. Set the
      Query
      property value to
      SELECT * FROM "DataLogger1" ORDER BY "Timestamp" DESC
      .
  3. Configure data grid columns:
    1. In the
      Properties
      pane, under
      Columns
      , double-click
      DataGridColumn1
      and enter
      TimestampColumn
      .
    2. Under
      DataItemTemplate
      , create a dynamic link between the column
      Text
      property and
      Aliases
      {Item}
      PointedNode
      Timestamp
      .
      NOTA: Enter
      Timestamp
      in the
      Insert the dynamic link sub-path...
      field.
      For more information about dynamic links, see Create dynamic links.
    3. Set the
      Title
      property value to
      Timestamp
      .
    4. Next to
      Columns
      , select
      Add
      and select
      Text column
      .
    5. In the
      Properties
      pane, under
      Columns
      , double-click
      DataGridColumn1
      and enter
      VariableValueColumn
      .
    6. Under
      DataItemTemplate
      , create a dynamic link between the column
      Text
      property and
      Aliases
      {Item}
      PointedNode
      Variable1
      .
      NOTA: Enter
      Variable1
      in the
      Insert the dynamic link sub-path...
      field.
      For more information about dynamic links, see Create dynamic links.
    7. Set the
      Title
      property value to
      Variable value
      .
  4. Create a refresh button:
    1. In the
      Project view
      pane, right-click
      MainWindow (type)
      and select
      New
      Base controls
      Button
      .
    2. In the
      Properties
      pane, set the
      Text
      property value to
      Refresh Data
      .
    3. In the
      Events
      pane, next to
      MouseClick event
      , select
      Add
      and select
      ProjectName
      UI
      MainWindow (type)
      DataGrid1
      Refresh
Fornire un feedback
Hai domande o feedback su questa documentazione? invia il tuo feedback qui.