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 Color of Line Object

Avatar

Level 2

aLine.border.edge.color.value

="207,29,3";

This doesnt work.. any suggestions?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Give this a go....

xfa.resolveNode("aLine.value.line.edge.color").value= "207,29,3";

Steve

View solution in original post

6 Replies

Avatar

Correct answer by
Level 10

Give this a go....

xfa.resolveNode("aLine.value.line.edge.color").value= "207,29,3";

Steve

Avatar

Level 2

Thanks Steve it worked.

Do you also know how to change a Text Field value (not caption) font color?

xfa.resolveNodes("aTextbox.font.fill.color").value="130,0,60";

Avatar

Level 10

To change the fill color

xfa.resolveNode("aTextBox.ui.#textEdit.border.fill.color").value = "130,0,60";

To change the font color

aTextBox.font.fill.color.value = "130,0,60";

Avatar

Level 2

One last thing.

On Initialize of the Parent Subform a Table belongs in I change the Header Fill color based on a variable.  Other instances of this Table gets added with a button click.. everything works find interms of the add.

When I change the color though the new tables added do not take the new color of the initialize event.

Is there a way I can do it on the add event?

this.parent.instanceManager.addInstance(1);

this.parent.instanceIndex< ??? >.execInitialize();

Avatar

Level 1

I have a text field "RESULT" which is to display G/Y/R depending on value of EXPOSURE.

I need to color the background of RESULT accordingly.

The below works fine, except that the G/Y/R letter gets overwritten with the color value numbers.

What am I doing wrong?

if(EXPOSURE<5) then RESULT = "G"
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "0,255,0";
elseif(EXPOSURE == 6) then RESULT="Y";
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "255,255,0";
elseif(EXPOSURE > 6) then RESULT="R";
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "207,29,3";
endif

Many thanks,

Norm

Avatar

Level 1

Simple Fix:

if(EXPOSURE<5) then
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "0,255,0";
  RESULT = "G"
elseif(EXPOSURE == 6) then
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "255,255,0";
  RESULT="Y";
elseif(EXPOSURE > 6) then
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "207,29,3";
  RESULT="R";
endif

Thanks

Norm