Window

Description

The instance represents a top-level window or dialog box, which contains user-interface elements.

The globally available?Window?object provides access to predefined and script-defined windows.

Properties

active readonly Set to true to make this window active.
alignChildren readonly Tells the layout manager how unlike-sized children of this container should be aligned within a column or row.
alignment readonly The alignment style for child elements of a container. If defined, this value overrides the alignChildren setting for the parent container.
bounds readonly The bounds of the window’s drawable area, excluding the frame, in screen coordinates.
cancelElement readonly For windows of type dialog, the UI element to notify when the user presses a cancellation key combination.
characters readonly A number of characters for which to reserve space when calculating the preferred size of the window.
children readonly The collection of UI elements that have been added to this container.
defaultElement readonly For windows of type dialog, the UI element to notify when the user presses a Enter key.
enabled readonly True if this element is enabled.
frameBounds readonly The bounds of the window frame in screen coordinates.
frameLocation readonly The top left corner of the window frame in screen coordinates.
frameSize readonly The size and location of the window’s frame in screen coordinates.
graphics readonly The graphics object that can be used to customize the window?s appearance, in response to the onDraw event.
helpTip readonly The help text that is displayed when the mouse hovers over the element.
indent readonly The number of pixels to indent the element.
justify readonly The default text justification style for child text elements.
layout readonly The layout manager for this container.
location readonly The upper left corner of the window’s drawable area.
margins readonly The number of pixels between the edges of a container and the outermost child elements.
maximized readonly True if the window is expanded.
maximumSize readonly The largest rectangle to which the window can be resized.
minimized readonly True if the window is minimized or iconified.
minimumSize readonly The smallest rectangle to which the window can be resized.
opacity readonly The opacity of the window, in the range [0..1].
orientation readonly The layout orientation of children in a container.
parent readonly The immediate parent element.
preferredSize readonly The preferred size of the window.
properties readonly An object that contains one or more creation properties of the container (properties used only when the element is created).
shortcutKey readonly The keypress combination that invokes this element’s?onShortcutKey()?callback.
size readonly The current size and location of the content area of the window in screen coordinates.
spacing readonly The number of pixels separating one child element from its adjacent sibling element.
text readonly The title, label, or displayed text, a localizeable string.
type readonly The element type; “dialog”, “palette”, or “window”.
visible readonly When true, the element is shown, when false it is hidden.
window readonly The window that this element belongs to.
windowBounds readonly The bounds of this window relative to the top-level parent window.

Static Properties

frameworkName readonly Deprecated. Use?ScriptUI.frameworkName?instead.
version readonly Deprecated. Use?ScriptUI.version?instead.

Constructors

Window readonly Creates a new window.

Methods

add readonly Creates and returns a new control or container object and adds it to the children of this window.
addEventListener readonly Registers an event handler for a particular type of event occuring in this window.
center readonly Centers this window on screen or with repect to another window.
close readonly Closes this window.
dispatchEvent readonly Simulates the occurrence of an event in this target.
hide readonly Hides this windows.
notify readonly Sends a notification message to all listeners, simulating the specified user interaction event.
remove readonly Removes the specified child control from this window?s children array.
removeEventListener readonly Unregisters an event handler for a particular type of event occuring in this window.
show readonly Makes this window visible.

Static Methods

alert readonly Displays a platform-standard dialog containing a short message and an OK button.
confirm readonly Displays a platform-standard dialog containing a short message and two buttons labeled Yes and No.
find readonly Use this method to find an existing window.
prompt readonly Displays a modal dialog that returns the user?s text input.

Events

onActivate readonly An event-handler callback function, called when the window acquires the keyboard focus.
onClose readonly An event-handler callback function, called when the window is about to be closed.
onDeactivate readonly An event-handler callback function, called when the window loses the keyboard focus.
onMove readonly An event-handler callback function, called when the window has been moved
onMoving readonly An event-handler callback function, called when the window is being moved
onResize readonly An event-handler callback function, called after the window has been resized
onResizing readonly An event-handler callback function, called while a window is being resized
onShortcutKey readonly In Windows only, an event-handler callback function, called a shortcut-key sequence is typed that matches the?shortcutKey?value for this window.
onShow readonly An event-handler callback function, called just before the window is displayed