Add Controls to Displays and edit properties, mapping to tags.
Home → Tutorials → User Interactions Tutorial → Displays Module Tutorial → Add Controls to Displays Tutorials
Related: Concept | How-to Guide | Reference
This Tutorial Teaches you to:
- Use basic controls
- Configure control properties
- Bind controls to tags
- Create control interactions
Prerequisites:
1. Basic Input Components
Open the display in the Draw editor.
Button:
- Drag Button from the toolbox.
- Double-click the control and go to Settings.
- Properties:
- Label Text: "Start Motor"
- Width: Auto
- Click Dynamics and check Actions.
- In Actions, choose ToggleValue.
- In Object, type
@Tag.Equipment/MotorRunning.
Numeric Input:
- Drag NumericTextBox from the toolbox.
- Double-click the control and go to Settings.
- Bind LinkedValue to
@Tag.Setpoint. - MinValue: 0, MaxValue: 100.
2. Text Components
Text Display:
- Drag TextBlock from the toolbox.
- Double-click the control and go to Settings.
- Text with composite tag template:
Temperature: {@Tag.TankFarm/Tank1/Temperature} °C— curly-brace tag references must start with@. - On the bottom-right menu set Font to 24.
ProgressBar:
- Drag ProgressBar from the toolbox.
- Double-click the control and go to Settings.
- Bind LinkedValue to
@Tag.Tank_Level. - Maximum: 100.
- Leave the bar and foreground colors as theme defaults. To override, set Foreground explicitly (themed by default — omit to inherit).
DigitalGauge:
- Drag DigitalGauge from the toolbox.
- Double-click the control and go to Settings.
- Bind LinkedValue to a numeric tag, e.g.
@Tag.Pressure. DigitalGauge displays a numeric readout; use an indicator-style control for boolean run/stop states.
3. Gauge Components
Radial Gauge:
- Add RadialGauge.
- Double-click the control and go to Settings.
- Bind LinkedValue to
@Tag.Pressure. - Minimum Value: 0.
- Maximum Value: 150.
- Major Ticks Quantity: 16 (one tick every 10 units across 0..150).
RadialGauge is the unified gauge control introduced in 10.1.5. Choose a Preset (Full, SemiCircle, CenterValue, or BandedRange) to pick the visual style. It replaces the legacy CircularGauge, CenterValueGauge, and RangeCircularGauge for new displays — existing displays keep rendering with the legacy controls unchanged.
Linear Gauge:
- Add LinearGauge.
- Double-click the control and go to Settings.
- Gauge Orientation: Vertical.
- Bind LinkedValue to
@Tag.Tank_Level.
4. Chart Components
Trend Chart:
- Add TrendChart.
- Double-click the control and go to Settings.
- Configure pens (slash-separated UNS tag paths):
- Pen1:
@Tag.TankFarm/Tank1/Temp— series color Blue. - Pen2:
@Tag.TankFarm/Tank1/Pressure— series color Red.
- Pen1:
- Auto: true.
Pie Chart:
- Add PieChart.
- Double-click the control and go to Settings.
- ChartType: Percent.
- LinkedValue entries (tag path; series color set separately):
@Tag.TankFarm/Tank1/Pressure— series color Blue.@Tag.TankFarm/Tank2/Pressure— series color Red.
- Name entries:
- Pressure Tank 1
- Pressure Tank 2
5. Container Components
Tab Control:
- Create three additional displays named:
- TankPage1
- TankPage2
- TankPage3
- Go back to your MainPage and add a TabControl.
- Double-click the control and go to Settings.
- Under Items Source Link, set Designer and add three ChildDisplay entries; type the display names you just created into Linked Display.
6. Images
Image Display:
- Find the Import File control.
- Choose an image from your computer.
- The image is registered in the solution and can be reused after the first import.
Web Browser:
- Add a WebBrowser control.
- Double-click the control and go to Settings.
- URL: https://www.tatsoft.com
7. Advanced Interactions
ComboBox with Database:
Prerequisite: this example reads from a Dataset Query named ActiveOrders. Define the query under Datasets → Queries before running — see the Datasets Module Tutorial for end-to-end query setup.
- Add a ComboBox control.
- In ComboBox Properties → Uid, type combo1.
- Go to the page Code Behind.
- Inside the DisplayOpening method, add:
TComboBox ComboBox1 = this.CurrentDisplay.GetControl("combo1") as TComboBox;
DataTable dt = await @Dataset.Query.ActiveOrders.SelectCommandAsync();
if (dt != null && dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
ComboBox1.Items.Add(row["ColumnName"].ToString());
}
}
- Replace ColumnName with the actual column name returned by your query.
8. Dynamic Animations
Add dynamics to any control:
- Double-click the control.
- Select Dynamics.
- Add:
- Visibility: show/hide by condition.
- MoveDrag: move based on a value.
- Scale: resize dynamically.
- FillColor: change fill by state.
- Rotate: rotate by angle.
9. Symbols
Create reusable control sets:
- Select controls to group:
- Choose any of the controls created in previous steps, or create two new controls.
- Use Ctrl+click to select multiple controls.
- Group the controls:
- Click the Group button in the top horizontal toolbar, or
- Right-click → Group.
- Create the symbol:
- Right-click on the grouped controls → Make New Symbol.
- In the Name field, type SymbolExample.
- Click Yes to create the symbol.
- Reuse across displays:
- The symbol now appears in the Symbol Library.
- Drag and drop from the library to any display.
10. Shapes
In addition to standard controls and symbols, Canvas displays support drawing shape primitives — Rectangle, Ellipse, Line, Polygon, Path, and related drawing primitives — useful for process diagrams and schematic backgrounds. Shapes accept dynamics (FillColor, Visibility, Rotate, MoveDrag, Scale) the same way controls do.
For the full shape catalog and per-shape properties, see the Display Controls Reference.
In this section...