Setting FillColor to transparent | Community
Skip to main content
July 31, 2006

Setting FillColor to transparent

  • July 31, 2006
  • 14 replies
  • 8350 views
Hello all,



I am having a problem with a form I am laying out in LiveCycle Designer. I have a textfield that users click on and enter information. After the users are done updating the text field, if the text field contains a value I want it the fillcolor to be white. If the text field contains no value, I want it to be tranparent.



I already have the code to check to see if the text field is empty or if it has a value. My problem is in making the field transparent. In previous versions of Acrobat I used to use:



this.getField("FieldName").fillColor = color.white;



and



this.getField("FieldNme").fillColor = color.transparent;



this.getField no longer works with this new Acrobat. Instead, with LiveCycle Designer, for white, I am using:



this.fillColor = "255", "255", "255";



which works perfectly. I don't know how to set the transparency.



this.fillColor = color.transparent;



does absolutely nothing.



Does anyone know what I am doing wrong?



Thanks in advance,

Matt
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

14 replies

July 31, 2006
Yes, I tried that, and it does make the text field disappear.



But... there is no way to make it reappear. What I want to do is set the background to transparent if there is no value, unless the user goes back and enters a value, when I want the background to turn solid white.



You see, there is an image behind the text field. If the user has information entered, I want the background to be white so the image doesn't interfere with the text. But if the text field contains no value, I don't want an empty white rectangle, I want it to turn back to transparent to show the image behind it.



If I set this.presence to "invisible", the user can no longer interact with the text field, and they may want to do so before they print the form.



Does that make sense?
July 31, 2006
this.presence = "invisible";



will do it for you then.



Chris

Adobe Enterprise Developer Support
July 31, 2006
Yes, that is exactly what I am trying to do.
July 31, 2006
What's your ultimate goal for doing this? Are you trying to make the field disapear if it has no value?



Chris

Adobe Enterprise Developer Support