> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-vi-scada/datranvue/design-screens.md).

# Design screens in DATRANVue Designer

Draw screens in DATRANVue Designer: place and align controls, link them to DATRAN points, link screens together, and run them in Runtime.

Forms created with DATRANVue Designer have a file extension of `.QML`. This file type has been associated with the DATRANVue Runtime.

{% hint style="info" %}
**Applies to:** DATRANVue V3.x. See [Connect Designer to DATRAN](https://help.qtech.co.nz/datran/datran-vi-scada/datranvue/install.md#connect-designer-to-datran).
{% endhint %}

## The Designer window

| Part              | What it is                                                                                                                                                                                                                        |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Menus and toolbar | At the top of the application is the menu and toolbar. The main window is made up of the drop down menus, the control selection tool bar and the tool bar select tabs. A drawing can have controls taken from multiple tool bars. |
| Properties        | Down the left of the application is the properties window. Clicking the mouse on a row of the grid will allow you to change its value.                                                                                            |
| Drawing area      | Opening a form will display a new Drawing Area window. You can have multiple of these windows on display at the same time.                                                                                                        |

### Menus

| Menu  | Items                                                                                                                                              |
| ----- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| File  | New Form, Open, Save, Save As, Save All, Close Form, Exit                                                                                          |
| Edit  | Alignment, Make Same Size, Cut, Copy, Paste, Select All                                                                                            |
| View  | Toolbar (F11), Properties Window (F12), Full Screen (Esc to return)                                                                                |
| Tools | Datran Link Setup, Show Datran Links (a list of all of the links into DATRAN for all of the selected controls), Create HTML Wrapper, Run Magnifier |
| Help  | Contents, Enter License, About                                                                                                                     |

### Standard controls

| Control                       | Use it for                                                                                                                                                                                                                                                                                                                                 |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Selector                      | Use this when you want to select, move or resize a control on the form.                                                                                                                                                                                                                                                                    |
| Button                        | Buttons can be used for linking to subsequent form, running external programs or closing forms.                                                                                                                                                                                                                                            |
| Label or edit box             | This can be used to display either static text or any live data retrieved from DATRAN. If the control is set to be editable then data can also be written back to DATRAN.                                                                                                                                                                  |
| Horizontal and vertical lines | A Horizontal Line. A Vertical Line.                                                                                                                                                                                                                                                                                                        |
| Check box                     | This can be used to either display or edit digital points in DATRAN. Its standard form shows either a tick or an empty box but it can be customised to two bitmaps of your choice representing the on and off state.                                                                                                                       |
| Circle and square             | The circle can be either empty or filled and also has a mouse click property to allow it to be used like a button. The circle is transparent and so can be overlaid over other controls e.g. a graphic or a city map. The square has identical properties to the circle so can also be filled or used as a button.                         |
| Graphic                       | This allows you to place a user defined graphic on the form. The graphic can be either a BMP, JPG or GIF file. This type of control can also be used like a button. You can now import more file types, including PNGs with transparency layers, allowing you to further customise DATRAN Vue with site photos, company logos etc. (V3.18) |
| Arrowhead                     | This control can be placed on the form and rotated by 90 degrees increments.                                                                                                                                                                                                                                                               |

## Draw a form

1. Select **File > New Form**. The grid will be populated with all of the editable properties of the main drawing area. Some values, such as Screen Size, will allow you to select from a drop down list of common screen sizes (e.g. 800x600).
2. Drawing is simply a case of selecting a control from the appropriate tool bar from the Main window and then clicking the mouse on the Drawing Area window in the position you wish the control to be at.
3. The control you have placed will have some yellow squares around its edge. In general the left and top squares allow you to reposition the control and the right and bottom squares allow you to stretch the control.
4. When you have placed a control the Properties window will update showing you all of the properties that the particular control has.

Tip: If you want to select the background form or another object then it is best to select the pointer icon from the tool bar first. This means that if you accidentally click on the background form when attempting to select another object then a new object will not be placed in that position.

### Line controls up

* By default when you create a new Drawing Area window the form's properties show **Snap to Grid**. If you turn this off (by clicking on the property) or by selecting a smaller grid resolution then controls can be moved around the Drawing Area window with finer precision.
* From the Edit menu you can select the controls alignment relative to another control. Place 2 controls on the Drawing Area, select them both and then select **Alignment - Centre Vertical** from the Edit menu. You will notice that the control without the yellow focus squares has moved in line with the control that does have the yellow focus squares. To select multiple controls you can drag a rectangle over them using the mouse.
* **Make Same Size** allows the width or height of multiple controls to be matched.
* **Run Magnifier:** Magnifier is a Microsoft product that is installed with the Windows Operating System. It allows zooming in and out of the screen and can be useful for aligning controls with greater precision.

## Link controls to DATRAN

All controls have properties that can be linked back to DATRAN. For example, a text box has a property call **Text Link**. You may wish to make this link to a DATRAN node to show the current throughput of a Flow Meter. Clicking on the property displays the DATRAN node selection screen allowing you to make this link.

Note that when you are in the Designer this value will not dynamically change even if it changes in DATRAN. It is only the DATRANVue Runtime that will reflect the same values.

**Show Datran Links** displays a dialog box that provides a list of all of the links into DATRAN for all of the selected controls.

## Let operators enter values

* If the control is set to be editable then data can also be written back to DATRAN.
* To further improve use on touch screen devices, we have introduced a new on screen option keypad (OSK) for "Labels". To use this feature enable "OSK" and remember to point the "Text Link:" to the value/setpoint in DATRAN. The OSK will then appear when the label is clicked. (V3.8)

![The DATRANVue on-screen keypad](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2Fnfs5IVUgsbIzTiulOagJ%2Fvue-on-screen-keypad.png?alt=media)

Only users with a specified user name and password will be allowed to perform an action that will change the DATRAN VI database. See [Set up operators for control](https://help.qtech.co.nz/datran/datran-vi-scada/datranvue/install.md#set-up-operators-for-control).

## Buttons

* Buttons can be used for linking to subsequent form, running external programs or closing forms.
* **Two state Button Option:** This useful option has been introduced and is essentially a latching or press-and-stay-down button option. (V3.8)
* **Option to remove the colour gradient and corners:** As requested we have made these changes to improve visual contrast. (V3.8)
* See [Open a plot from a shortcut or another program](https://help.qtech.co.nz/datran/datran-vi-scada/datran-trending/plots.md#open-a-plot-from-a-shortcut-or-another-program).

## Save your work

**Save** saves the current form if its filename is already known. **Save All** saves multiple forms when more than one form is on display. In V3.18, every 5 minutes the form is saved to a Temp/dv-autosave folder (`C:\Users\<username>\AppData\Local\Temp\dv-autosave`). To help prevent any lost design work, you can access these forms from File/Open (recovery).

## Run your screens

You can simply double-click the mouse on the QML filename to start up. For your main form you may also wish to create a desktop shortcut to it. If you have multiple screens you do not have to have multiple DATRANVue Runtime shortcuts set up. You may link them together using a button control or any other control that has a **Click Action** property. Consider having an overview screen or a control panel style screen.

For a gauge showing usage against bands, see [Add a segmented gauge](https://help.qtech.co.nz/datran/datran-vi-scada/datranvue/segmented-gauge.md).
