Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

0 Replies

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