
CHAPTER 4: User-Interface Tools Window object 118
Window object functions
These functions are defined for Window instances, and as indicated for container objects of type Panel and
Group.
text
String The title, label, or displayed text. Does not apply to containers of
type
group or tabbedpanel. This is a localizable string: see
“
Localization in ScriptUI objects” on page 103.
visible
Boolean When true, the element is shown, when false it is hidden.
When a container is hidden, its children are also hidden, but they
retain their own visibility values, and are shown or hidden
accordingly when the parent is next shown.
window
Window The top-level parent window of this container, a Window object.
windowBounds
Bounds A Bounds object for the size and location of this container relative
to its top-level parent window.
add()
windowOrContainerObj.add (type [, bounds, text, { creation_props> } ]);
type
The control type. See “Control types and creation parameters” on page 124.
bounds
Optional. A bounds specification that describes the size and position of the new
control or container, relative to its parent. See Bounds
object for specification
formats.
If supplied, this value creates a new Bounds
object which is assigned to the new
object’s
bounds property.
text
Optional. String. Initial text to be displayed in the control as the title, label, or
contents, depending on the control type. If supplied, this value is assigned to
the new object’s
text property.
creation_props
Optional. Object. The properties of this object specify creation parameters,
which are specific to each object type. See “
Control types and creation
parameters” on page 124.
Creates and returns a new control or container object and adds it to the children of this window or
container.
Returns the new object, or
null if unable to create the object.
Komentáře k této Příručce