Swapping vs. Opening
The two primary window navigation operations are: swapping and opening.
Swapping
When Ignition swaps a window, it closes the window and then opens another window in its place. This operation can be performed on windows in any state: docked or floating, maximized or not. The Start Maximized and Dock Position properties of the window that is being swapped in will be ignored - it will take the dock and maximized state of the window that it is replacing.
This operation is so common in the typical navigation strategy that there is even a version of the swapping function dedicated to it, the swapTo function. This function eliminates the need to specify the window to swap from - you only need to specify the window to swap to. It will take the current window - that is, the current maximized window - as the window to swap from.
See the following functions for more information:
Opening
Opening and closing are the basic window navigation options. Opening a window opens the window at the same size it was in the Designer, unless the Start Maximized property is true or the Dock Position is not Floating.
To make a floating popup window open at a specific location, make sure to set the Location property of the window in the Designer. If the window was recently open, it will open in its last state due to window caching. See the Window's Cache Policy property for more information.
See the following function for more information:
Open or Swap a Window with Scripting
-
In the Designer, right-click on a component and select Scripting.
Usually a button is used to open a window. -
Select the appropriate Event Handler for the component.
Event Handlers are different for different components. There are a number of different options to choose from based on how and when you want your window to open or swap.
If you are using a button, select the actionPerformed Event Handler. -
Select the Navigation tab.
-
Click the Open/Swap radio button.
-
Select either the Open or Swap radio button as your Navigation strategy.
Typically you want to use the Open option for Popup and Docked windows, and the Swap for the Main windows that will be in the background as you can only view one at a time. -
Select the Window you want to open/swap from of the Window dropdown.
Similar Topics ...