Expand my Community achievements bar.

SOLVED

Change background color for postPrint event

Avatar

Level 7

I have a drop down list with a solid color as background(153, 203, 255).

How I can change the color to white for postPrint event?

Regards

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

This is the script I use. Note that you have to specify the UI reference for the object type:

var vName = this.somExpression;

var fieldObj = xfa.resolveNode(vName + ".ui.#choiceList.border.fill.color");

fieldObj.value = "255,255,255"; // white


/* Check the type of object and change the .ui reference:

     Date field =      #dateTimeEdit 

     Dropdown =      #choiceList 

     Checkbox =      #checkButton 

     Text field =      #textEdit 

     Numeric field =     #numericEdit

*/

Also the object has to have a background colour to start with.
Hope that helps,
Niall

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi,

This is the script I use. Note that you have to specify the UI reference for the object type:

var vName = this.somExpression;

var fieldObj = xfa.resolveNode(vName + ".ui.#choiceList.border.fill.color");

fieldObj.value = "255,255,255"; // white


/* Check the type of object and change the .ui reference:

     Date field =      #dateTimeEdit 

     Dropdown =      #choiceList 

     Checkbox =      #checkButton 

     Text field =      #textEdit 

     Numeric field =     #numericEdit

*/

Also the object has to have a background colour to start with.
Hope that helps,
Niall