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

Having a problem changing the border color of the value part

StevenD
Registered: Oct 6 2006
Posts: 368

This is an LCD ES JavaScript problem.

I am trying to change the border color of the value part of the field on the mouseEnter event. So far the only thing I have gotten to work so far it this.

this.resolveNode("ui.#numericEdit").border.edge.color.value = "255,0,0";

The only problem is it changes only the top edge and not the other three sides.

I have found examples of how to change the fill color of the value part of the field but sure can't find much to help with the border.

Anyone have any ideas?

StevenD

My Product Information:
LiveCycle Designer, Windows
azmyach
Registered: Apr 28 2009
Posts: 4
Hi StevenD,

I'm facing the same problem. did you find any solution ?

Thanks,

chaf
StevenD
Registered: Oct 6 2006
Posts: 368
No. As you can see no one else responded with a solution. I finally gave up after working with it for a couple of days and moved on to something else. I had forgotten about it but now your post has got me thinking of it again. I think I will try working at it. If you end up finding anything post it here.

StevenD

akshay
Registered: May 13 2009
Posts: 5
try changing the apperance of the text field to SolidBox or to some other
azmyach
Registered: Apr 28 2009
Posts: 4
Thanks for your answers.

akshay :

I have already tested it and as said by StevenD, in his first post, only the top edge is changed the others still as by default :(

I'll be back if I find how to do it .
PetafromOz
Registered: Jun 8 2009
Posts: 230
Hi StevenD, this is bizarre - I have the reverse problem to you. I actually WANT to change only one edge of my border and couldn't figure out how. So I'll give your method a go and that might do it.

Meanwhile, to change the entire border colour:

ENTER EVENT...
this.borderColor = "255,255,221"; //change the border colour to match the fill colour - thus making it 'invisible'.

EXIT EVENT...
this.borderColor = "0,0,0"; //change the border colour back to black

from way... underground at Parkes - central West NSW - Australia

StevenD
Registered: Oct 6 2006
Posts: 368
Thanks for the reply. I'm still not getting the results I have been hoping for. And the ENTER and EXIT events you posted don't do anything at all. I don't know what is going on. I'm curious to know what happens when you use the method I have played around with.

StevenD

jonom
Registered: Jan 31 2008
Posts: 133
You need to loop through the edges of the object.

Code taken from a sample someone gave me for the same idea.

On the Enter event:
var vName = this.name.toString(); xfa.resolveNode(vName + ".ui.textEdit.border.edge").stroke = "solid"; for (var i=0; i<4; i++) {this.ui.oneOfChild.border.getElement("edge",i).color.value = "255,0,0";}

On the Exit event (just sets it to lowered - you'd need to redo the loop if you're using different colours):
var vName = this.name.toString(); xfa.resolveNode(vName + ".ui.textEdit.border.edge").stroke = "lowered";

Hope that helps!
scderacjor
Registered: Mar 27 2009
Posts: 123
Have you looked at this PDF example:

http://partners.adobe.com/public/developer/en/livecycle/designer/pdfs/HighlightingFields.pdf


I've been using this code for months now. Also, you can change the color using RBG values.


Heres the scripting. You can also save the PDF and open it in LiveCycle to experiment with it. That's how I learned:
form1.#subform[0].Name::enter - (JavaScript, client)
Name.border.edge.color.value = "0,0,255";
form1.#subform[0].Name::exit - (JavaScript, client)
Name.border.edge.color.value = "255,255,255";
form1.#subform[0].Name::mouseEnter - (JavaScript, client)
Name.border.edge.color.value = "0,0,255";
form1.#subform[0].Name::mouseExit - (JavaScript, client)
Name.border.edge.color.value = "255,255,255";
StevenD
Registered: Oct 6 2006
Posts: 368
I finally got this solved with help from Thom Parker when I posted this problem again in a new thread.

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=25197

StevenD