These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

set border on the value part of a textEdit field?

JGarn23
Registered: Feb 17 2010
Posts: 35
Answered

I'm using myText.border.edge.color.value = '0,255,0'; to set the border on a text field. Problem is, sometimes it sets the border round the full text field (caption plus value), other times it only sets it round the value part. I can copy an object between different forms and it the same behaves differently on different forms.

Does anyone know what controls this behaviour or how to solve this?

Thanks.

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
All fields have an outer shell that includes the caption and an outer border. Then there is the actual field inside with it's own border. It's accessed like this for a field named "TextField2"

// Border Color
TextField2.ui.textEdit.border.edge.color.value="0,255,0"

// fill color
TextField2.ui.textEdit.border.fill.color.value="0,255,0"

Unfortunately the edge color isn't handled very well in all versions of Acrobat. A more robust approach is to set the caption postion to "None" and use the outer border as the field border.
so that the regular "borderColor" can be used to control it.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script