Window Properties

Anatomy of a Window

Name and Path

Windows are the top-level unit of design for Vision projects. A window is identified by its path, which is the name of all its parent folders plus its name, with forward slashes (/) in between. For example, the path to a window in the top level called MainWindow would simply be its name, whereas the path to a window named UserOptions under a folder called OptionsWindows would be: OptionsWindows/UserOptions.

images/download/attachments/6034257/name_and_path.PNG

Root Container

Inside a window is always the Root Container. This is a normal container component except that it cannot be deleted or resized - its size is always set to fill the entire window. The Root Container is where you will place all of your components in the window.

Titlebar and Border

A window may display a Titlebar and/or a Border. The titlebar allows the user to drag the window around in the client, and houses the window's close and maximize/restore buttons. The border of a window can be used to resize the window in the client when it is floating or docked. Whether on not the titlebar and border are displayed depends on the values of the window's titlebar and border display policy properties, and its current state. Commonly, a window will display 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 to make main and docked windows join seamlessly.

Window Properties

There are a number of window properties that change the way the windows look and behave. The commonly changed properties are: Closable, Maximizable, Resizable, Start Maximizable, Title, Border Display Policy, Titlebar Display Policy, Dock Position, and Layer.

You can modify these window properties, just like a component's property. Simply select the window by clicking on the window's name in the Project Browser, and while it is open, set the properties in the Property Editor .

images/download/attachments/6034257/Window_Property_Editor.png

Here is a description of all the available window properties in the Property Editor.

Name

Description

Data Type

Scripting Name

Value

Behavior

 

 

 

 

 

Closable

Closable Determines whether or not to draw the close (X) button in the upper right corner.

boolean

closable

 

Maximizable

Determines whether or not to draw the maximize button in the upper right corner.

boolean

maximizable

 

Resizeable

Determines whether or not to let the user resize the window.

boolean

resizable

 

Start Maximized

When set to true, the window will become maximized when it is opened.

boolean

startMaximized

 

Cache Policy

By default this property is set to Auto, which keeps a window in a memory cache for a while after it is closed, so that if it is opened again it will be quick. The window isn't "active" while it is closed: all of its bindings and scripts are shut down.

Setting this property to Never causes a fresh copy of the window to be deserialized every time it is opened. This is a performance hit, but it also is a convenient way to "clear out" the values of the window from the last time it was opened, which can be helpful in data-entry screens.

Setting the property to Always will trade memory for higher performance, causing the window to always remain cached after the first time it is opened. This means the window will open very fast, but your Client will need lots of memory if you do this to a large amount of windows.

int

cachePolicy

0 Auto

1 Never

2 Always

Appearance

 

 

 

 

Title

The title to be displayed in this window's titlebar.

String

title

 

Border Display Policy

Determines if window's border is shown in various window states.

int

borderDisplayPolicy

0 Always

1 Never

2 When Not Maximized

Titlebar Display Policy

Determines if window's titlebar is shown in various window states

int

titlebarDisplayPolicy

0 Always

1 Never

2 When Not Maximized

Titlebar Height

The height of the window's titlebar.

int

titlebarHeight

 

Titlebar Font

The font of the window title in the titlebar.

Font

titlebarFont

 

Layout

 

 

 

 

Dock Position

Determines the position this window is docked to, or if it is floating.

int

dockPosition

0 Floating

3 West

4 South

2 East

1 North

Location

The location that this window will open up at. Only applicable to floating windows that are not set to start maximized. This value will be overridden when an open window script specifies where to open.

Point

startingLocation

 

Size

The dimensions of the window. This can be manipulated by selecting the window and dragging the resize handles along the windows right and bottom edges.

Dimension

size

 

Minimum Size

The minimum size that this window will allow itself to be resized to.

Dimension

minimumSize

 

Maximum Size

The maximum size that this window will allow itself to be resized to.

Dimension

maximumSize

 

Layer

Sets the layer that this window is in. Default layer is 0, which is the bottom layer. Windows in higher layers will always be shown on top of windows in layers beneath them. A common strategy for using the layer property is to set Main Windows and Docked windows to 0, Popups to 1 and very important popups to 2.

int

layer

 

Dock Index

Determines the order of docked windows if multiple are open on the same edge. Lower numbers are on the outside (closest to the edge the window is docked to), and higher numbers are closer to the center.

int

dockIndex

 

Similar Topics ...