windowObject.show Method
Syntax
windowObj.show();
windowObj.show(position);
windowObj.show(position, dockLocation);
windowObj.show(relativePosition, ele);
windowObj.show(yPosition, xPosition);
Arguments
- positionstring
Can be one of the following values:
- Position
- Description
- "centered"
Positions the window in the center of the viewport.
- "dock"
Docks the window to a position specified by dockLocation. If position is "dock", you must define the dockLocation.
- dockLocationstring
Defines the docked position. Only required if the first parameter, position is defined to be "dock". dockLocation can be one of the following values:
- Dock Location
- Description
- "top"
Window will be docked at the top of the screen.
- "bottom"
Window will be docked at the bottom of the screen.
- "left"
Window will be docked on the left of the screen.
- "right"
Window will be docked on the right of the screen.
- relativePositionstring
If specified, you must pass in a pointer to the 'parent' control, an element in the DOM, as the second parameter (ele) . relativePosition can be one of the following values:
- Relative Position
- Description
- "dropdown"
Window is opened below the 'parent' control. The left edge of the window is aligned with the left edge of the 'parent' control.
- "dropdown-right"
Same as 'dropdown' option excep that the window's right edge is aligned with the right edge of the 'parent' control.
- "flyout"
Window is opened to the right of the 'parent' control. The top of the window is aligned with the top of the 'parent' control.
- "flyout-bottom"
Window is opened to the right of the 'parent' control. The bottom of the window is aligned with the bottom of the 'parent' control.
- "popup"
Window is opened over the 'parent' control. The top of the window is aligned with the top of the 'parent' control.
- "popup-bottom"
Window is opened over the 'parent' control. The bottom of the window is aligned with the bottom of the 'parent' control.
- eleobject
Only required if relativePosition is defined. Id of the 'parent' element that the window is positioned relative to.
- yPositionstring
Defines the absolute y position of the window on the screen. Can be a numeric value defining the number of pixels or a string with a CSS units, eg: "100px", "2in", "10%".
- xPositionstring
Required if yPosition has been defined. Defines the absolute x position of the window on the screen. Can be a numeric value defining the number of pixels or a string with a CSS units, eg: "100px", "2in", "10%".
Description
Shows a window.
Discussion
Display a window. Takes optional arguments that control where the window is shown. If no arguments are specified, the window is shown in-view. If the window was previously shown, its last position is used if no arguments are specified.
Example
//get a pointer to the window object var windowObj = {dialog.Object}.getWindow('MYWINDOW'); if (windowObj) { // show the window in-view windowObj.show(); // show window centered on the screen windowObj.show('center'); // position the window absolutely at y = 24px and x = 32px windowObj.show(24, 32); // position the window absolutely in inches windowObj.show('1in','2in'); // show the window relative to another control var ele = {dialog.object}.getPointer('MY_BUTTON1'); windowObj.show('flyout',ele); // show the window docked on the top of the screen windowObj.show('dock', 'top'); }