Adding Controls To Windows - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide

Adding Controls to Windows

Use the <jsxcontrol> tag to define a variety of UI controls within a dialog window. The value of its type
attribute specifies whether the tag defines a pushbutton, checkbox, radio button, text field, popup menu,
or custom control. For a complete list of allowed types, see the GoLive CS2 SDK Programmer's Reference.
In addition to the control types provided by the SDK, you can create custom controls; see
Custom
You can also customize a control's response to user interaction; see
When it loads an extension containing a <jsxcontrol> tag, GoLive creates a
Depending on the type value, the object has a set of JavaScript properties and functions appropriate to
that control. For example, a control of type button provides the appearance and behavior of a
pushbutton.
All control objects have common behaviors, such as the ability to draw themselves in the location you
specify. They also have common attributes, such as those which specify the control's position. Any of your
<jsxcontrol> tags can define these attributes, and your JavaScript code can get or set the
corresponding properties in the control objects.
The <jsxcontrol> tag can accept the following attributes:
<jsxcontrol type="
All attributes are required, except halign and valign , which are not used for modal dialogs. For details
of the attribute values, see the GoLive CS2 SDK Programmer's Reference.
When it loads an extension containing this tag, GoLive creates a
control. You can get the object by its JavaScript name from the parent
Each type of control object also has specialized attributes and functions that apply only to that type. For
example, text-entry fields can capture keystrokes, but radio buttons cannot. If you call a function or
property for a control of the wrong type, the call is ignored or returns a default value. For example, if you
write a JavaScript statement that tries to set the itemCount property of a radio button, the control
ignores the statement because radio buttons have no such property. Similarly, if you try to call the
addItem function of any control other than a popup menu, GoLive ignores the call.
An element's attributes become properties of the object GoLive creates. For example, you can reposition a
control dynamically by setting new values for its bounds or size and location properties.You can hide
a control by positioning it outside the boundaries of the dialog that contains it.
Controls.
KindOfControl
InitialValue
value="
NumOfPixels
width="
option
halign="
Adobe GoLive CS2 SDK
JavaScriptName
" name="
NumOfPixels
" posx="
NumOfPixels
" height="
option
" valign="
" >
Windows and Controls
Providing Behavior for
control Object
"
NumOfPixels
" posy="
"
control Object Types
to represent the
window
Object's
66
Creating
Controls.
Types.
"
array.
children

Advertisement

Table of Contents
loading

Table of Contents