Control Containers; Creating Panels; Creating Tab Panels - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide

Control Containers

A window can use containers called panels, to group controls. You can define reusable groups of controls,
called panel resources. You can define tabbed panels, such as those in a palette, and split panels that
contain exactly two subpanels with a movable boundary line.

Creating panels

A panel, also called a view, is simple a rectangular area that can contain controls or other panels or groups.
You define it using the <jsxview> tag. You can define it directly inside a dialog or palette:
<jsxdialog ...>
<jsxview name="JSname" title="
</jsxview>
</jsxdialog>
You can also define a panel outside a window, as a panel resource. A panel resource defines a reusable
group of controls. One resource definition can be reused in a number of windows. For a panel resource,
omit the position parameters:
<jsxview name="
<!-- Control definitions here -->
</jsxview>
After it is defined, you can include a resource in a window, specifying it by name and setting the position.
For example:
<jsxdialog name="UIResourceTest" title="UIResourceTest" width="" height="">
<jsxview resource="myResPanel" name="Test Panel" posx="10" posy="10">
</jsxdialog>
The panel resource is included in the window along with all of its controls.
A panel is represented in GoLive by the JavaScript
define statically, as part of the panel definition, you can add controls to a panel dynamically, using the
panel object's add method; see
You can create also create a panel programmatically by adding a control of type="panel" to a window ,
object using its add method.

Creating tab panels

A tab panel contains subpanels that are all the same size, but have a labeled tab at the top. They overlay
one another, and only the top one is visible, except for the tabs. The user can select a panel (bring it to the
top) by clicking the tab. There are many examples of tabbed windows in GoLive, such as the Image
Property Inspector. The tab panel cannot contain controls directly; it contains only the subpanels as direct
children, and these in turn contain controls.
You define a tab panel using the <jsxtabview> tag. The tab panel element must be defined within a
window element such as <jsxdialog> . You can define the subpanels and their controls directly inside
the tab panel element, or you can use panel resources. For example:
<jsxdialog name="UITabTest" title="UITabTest" width="" height="">
numPixels
height="
" posx="
<!-- Controls definition here -->
resourceName
numPixels
height="
Adding controls to a window
Adobe GoLive CS2 SDK
viewTitle
" width="
numPixels
", posy="
resourceTitle
" title="
">
panel
Object. In addition to those controls that you
Windows and Controls
numPixels
"
numPixels
">
numPixels
" width="
dynamically.
63
"

Advertisement

Table of Contents
loading

Table of Contents