Creating Radio Button Groups; Creating Text Input Fields - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
<jsxcontrol type="static" name="bunPrompt" value="Which kind of bread?"
<jsxcontrol type="popup" name="breadMenu"
<jsxcontrol type="edit" name="custNameField" value="signal whenever
<jsxcontrol type="buttonedit" name="phoneField"
<jsxcontrol type="editarea" name="commentField"
<jsxcontrol type="static" name="chipsPrompt"
<jsxcontrol type="color" name="color" posx="10" posy="330" width=30
<jsxcontrol type="button" name="dialogOther" value="Change"
<jsxcontrol type="button" name="dialogCancel" value="Cancel"
<jsxcontrol type="button" name="dialogOk" value="OK"
</jsxdialog>

Creating radio button groups

A control of type radiobutton is a button that specifies a user option. Radio buttons can use the
optional group attribute to specify that the values offered by the grouped buttons are mutually exclusive.
For example, you might use this attribute to group
The value of the group attribute can be any string that is unique within the window. All radio buttons in
the window that have the same group value are mutually exclusive. When the user clicks any button in
the group, GoLive deselects all other buttons in the group.
These <jsxcontrol> tags define the radio buttons that appear in the previous example as belonging to
the same group, named cookBtn :
// grouped radio buttons
<jsxcontrol type="radiobutton" name="rareRadio" value="Raw" posx="10"
<jsxcontrol type="radiobutton" name="medRadio" value="Pinkish" posx="70"
<jsxcontrol type="radiobutton" name="wellRadio" value="Burnt" posx="140"

Creating text input fields

When the SDK interprets a <jsxcontrol> tag with type="edit" , "editarea" , "buttonedit" , or
"password" , it creates a control object with type=edittext , but with property values set to obtain
different default behaviors. All of these controls are text fields allow user input, but they signal events
differently, so your handlers are called for different user actions. You can define the response to user input
Adobe GoLive CS2 SDK
posx="10" posy="110" width="300" height="18">
value="Baguette, Pita, Rye, Sourdough, Wheat"
posx="10" posy="135" width="90" height="18">
focus changes" posx="10" posy="170" width="150" height="18">
value="signal when focus AND content changes"
posx="10" posy="200" width="200" height="18">
value="never calls onChange handler" posx="10"
posy="230" width="200" height="60">
value="Click the box to change its color."
posx="10" posy="304" width="300" height="18">
height=19>
posx="10" posy="365" width="60" height="18">
posx="80" posy="365" width="60" height="18">
posx="153" posy="365" width="60" height="18">
posy="80" width="60" height="18" group = "cookBtn">
posy="80" width="60" height="18" group = "cookBtn">
posy="80" width="60" height="18" group = "cookBtn">
and
radio buttons as mutually exclusive choices.
On
Off
Windows and Controls
68

Advertisement

Table of Contents
loading

Table of Contents