Titlebar and Border
A window can display a Titlebar and/or a Border. A titlebar allows you to drag a window around the workspace, and contains the window's close, maximize and restore buttons. The border of a window also lets you resize the window when it is floating or docked. Whether or not the titlebar and border are displayed depends on the property values set for your Titlebar and Border properties. A window typically displays both a titlebar and border when it is floating, but only a titlebar when maximized. It is often desirable to remove titlebars and borders on maximized windows.
Creating a Window
Creating windows is easy. There are three ways to create a new window:
Right Click in the Project Browser
Probably the most common method is to right click within the Windows section of the Project Browser and select one of the window types to create a window. While you can create each type of window, it is important to remember that the only difference is the configuration of the window properties.
Using the Welcome Window
The Welcome Window that is available when the project is first opened has a few quick start options available on it. One of these options is the ability to add a new window.
From the Menubar
In the menubar of the Designer, the File menu has a New option that allows you to create a new window regardless of where you are in the project.
Window Right-Click Menu
For a full list of properties that can be set on windows, refer to Vision - The Window Object. Windows also have right click menu of options for additional functionality.
|Open Window||Opens the selected window.|
|Close & Commit||Commits any changes to your workspace and closes the window.|
|Close & Revert||Reverts any changes that were made since the window was last opened or saved.|
|Open on Startup|
One of the most useful properties is the Open on Startup property, which when enabled will automatically open the window when the client first starts up. This makes it easy to open a static set of default windows that everyone can see after logging in to the project. Multiple windows can be set to open on startup, though it is recommended that only a single main window is set to open on start, as opening multiple at once will cause them to be hidden behind one main window.
All windows that Open on Startup have a little box with a Right Arrowicon next to the window name.
An "About" Window relays information to the user that may be important, such as instructions on how to use the project, or information about the projects creator. To specify a window as the About window, right click on the window in the Project Browser. Then click the About Window checkbox. The window will have a Information Bubbleicon displayed next to its name.
In the client, the window will be displayed when a user selected Help > About This Application.
Windows can also have notes attached to them. The notes provide a way for a windows designer to provide some documentation on what the window is doing and how the various components interact with one another.
|The Security options displays Security Settings for role-base security. For more information, refer to Security in Vision.|
|Rename||To rename a window, select this option then enter a new name.|
Duplicates the selected window.
|Cut||Cuts the selected window onto the clipboard.|
|Copy||Copies the selected window onto the clipboard.|
Copies the path of the selected window into the clipboard.
|Paste||Pastes the content in the clipboard into the selected context.|
|Delete||Deletes the current selection.|
|Protect||Locks the individual project resource from inside the Designer.|
|Send to||Sends the window to a different project on the same Gateway. A dropdown list of projects is displayed.|
|Export||Exports the window as a project resource file which can then be imported into other projects. See the following sections for examples of Export and Import.|
|Import||Imports a window that was already saved as a project resource file. See the following sections for examples of Import and Export.|
|Protect||Protects the window so that it is readable in a client. Writable only through bindings and scripts. The property's value will be synchronized to the browser, but any write attempt from the browser will be ignored.|
Exporting Window Example
In the Designer, you can export and import windows from one project to another project using external files.
You can export windows in two ways.
To export multiple windows, right click on the folder of windows and select the Exportproject export, the difference being that it automatically highlights only that window to export from the list of project resources.option. The window export works similarly to the
- To export one window, right click on an individual window and choose the Export option.
The Save window is displayed. You can save the windows with the existing project name (not recommended if you are only exporting part of a project), or type a new name in the File Name field.
- Click Save to save the windows as a project export file.
Importing Window Example
Importing the individual windows can be done by right clicking on the Windows expandable object and selecting Import.
Browse to the folder that contains the backup file you want to import, and click Open.
Setting up a navigation strategy allows you to navigate between different windows in the runtime Client. While we have a few examples of the most common navigation strategies, it is certainly not an exhaustive list as most users tend to combine multiple strategies to create a project that fits their needs.
A typical navigation strategy for a Vision project is as follows:
- Have a Docked window or two, usually docked North and/or West.
- Have a single Main window visible at a time.
- Use swap navigation to swap between the Main windows. This ensures that only one main window is open at a time.
- Use standard open navigation to open various Popup windows as necessary.
This style of project is so common, that the default operation of the Tab Strip component expects it. When it is in its default automatic operation, it expects that each tab represents a main window, and will automatically swap from the current screen to the desired screen. Additionally, the
[System]/Client/User/CurrentWindow Tag is calculated based on this strategy: its value is the name of the current maximized window. This navigation strategy is used in the Ignition Online Demonstration that you can download from our website.