0

I'm developing a form with Livecycle ES2. I need to change color of a line in a field:

Field

I can change background colour with:

var GREY = "225, 225, 225";

this.ui.oneOfChild.border.fill.color.value = GREY;

But, i don't know how to change color of line using "Adobe Javascript"

Andreas
  • 21,535
  • 7
  • 47
  • 56
Scottie
  • 1
  • 4

1 Answers1

0

If you only want to change the top border, then you need to do a couple of things: 1) Go into the Border tab of the field and set the Edges to be "Edit Individually" 2) Change one border to be different from the others (doesn't matter which one, but probably the top one).

This will force Designer to generate separate <edge> tags within the <border> tag. You can verify this by going into the XML Source tab and viewing the field. Before you make that change there will be one <edge> tag under <border> and afterwards, there will be 4 separate tags (one for each edges of the field's border - top, right, bottom, and left).

Once that's done, then the following line should work:

this.resolveNode("border.edge[0].color").value = "0,0,255"; // Set line to blue

What this is doing, is setting the first border.edge element's color child to have a value of 0,0,255. You need to do the resolveNode() call because JavaScript interprets the square brackets as an array reference. The resolveNode, passes the square brackets to the SOM expression engine which correctly interprets it as meaning the index number of a multiply occurring element.

You can replace edge[0] with edge[1], edge[2] or edge[3] for the other borders.

Rob McDougall
  • 328
  • 1
  • 10
  • Thansk's for answer, but it's not what I want. I need to change the black line: http://imgur.com/CnZ4IiX – Scottie Apr 03 '17 at 09:59