Displaying a single layout configuration in different controls
It is possible to have the TcHMI project organized in such a way, that a user with special operation rights can only configure the layout displayed on the control.
This configured layout should be displayed in other contents using different instances of ZoneImageLayout controls that work in View mode.
- 1. Create a server symbol of type tchmi:framework#/definitions/ZoneImageLayoutConfig and initialize its default values.
- 2. Create configuring control instance by drag and drop from toolbar. Bind this controls ZoneImageLayoutConfig attribute to the server symbol created in last step. Keep the binding two-way so changes will be stored back to the server symbol.
- 3. Set Mode attribute of this control to Config as this control will be used to edit the layout.
- 4. Create a new instance of control that will be used only for visualizing the layout. Set Mode attribute to View.
- 5. Bind the server symbol created in the 1st step to its ZoneImageLayoutConfig attribute. No need to set two-way binding mode as this control will only display the config and never change it.
- 6. This way same configuration can be displayed on different controls in the HMI.