Button - Adobe 12001196 - Acrobat - Mac Manual

Javascript
Hide thumbs Also See for 12001196 - Acrobat - Mac:
Table of Contents

Advertisement

Using Acrobat JavaScript in Forms
4
Creating form fields programmatically
All field types have the same properties availabe in the General tab of the Properties
dialog. It is possible through the UI in Acrobat to specify the Appearance of the field, its
Options and its Actions, all of which appear as tabs in the UI for a button field. All these
properties can be accessed through field-level JavaScript properties and methods.

Button

The Button Properties dialog has four tabs: General, Appearance, Options, and Actions.
General Tab
The General tab allows you to set the the following properties.
Name
Name
Tooltip
Common Properties
Read Only
Form Field
Orientation
Table Notes.
name is a read-only property. It can be set at creation time, either through the UI or
programmatically, with addField. See the example below.
Beginning with Acrobat 6.0, the Field.rotation property can rotate a button or
other field in multiples of 90 degrees. For example, the code below creates a vertically
oriented button.
In Acrobat 5, a rotated button can be created by rotating the page, creating the button,
then rotating back again, as in this example:
this.setPageRotations(this.pageNum, this.pageNum, 90);
var f = this.addField("actionField", "button", 0, [200, 250, 300, 200]);
f.delay = true;
f.strokeColor = color.black;
f.fillColor = color.ltGray;
f.borderStyle = border.b;
f.delay=false;
this.setPageRotations(this.pageNum, this.pageNum);
64
See Reference
name
userName
readonly
display
rotation
var f = this.addField("actionField", "button", 0,
[200, 250, 250, 400]);
f.strokeColor = color.black;
f.fillColor = color.ltGray;
f.borderStyle = border.b;
f.buttonSetCaption("Push Me");
f.rotation = 90;
Example
console.println(f.name);
f.userName = "Submit Button"
f.readonly = true;
f.display = display.visible
f.rotation = 90;
Acrobat JavaScript Scripting Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat 6.0

Table of Contents