Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Transparent borders or fill

Avatar

Level 4
Is there an equivalent to Acrobat's "f.fillColor=color.transparent;" that you can use in LD?
6 Replies

Avatar

Former Community Member
Not that I am aware of - you could set the border color to the same as the background.

Avatar

Level 4
Thanks Paul but unfortunately that doesn't work for this application. It's for a "non-captioned" checkbox inside a table.



All I want to do is continue to have the active field highlight in pale-yellow. I've got all my other fields (text, numeric, radio buttons, etc) all working. I just can't get the background of the checkbox to turn yellow on enter, and transparent on exit (AND not mask out the lines of the table).



Any ideas? Suggestions?

Avatar

Level 10
Hi Bet,



We have a similar situation where a checkbox is red if blank and green if ticked. We set up a variable and then have an if statement:



var fld1 = xfa.resolveNode("form1.p4c.hazard1.ui.#checkButton.border.fill.color");



if (hazard1.rawValue == 1) {

fld1.value = "225,255,225";

}

else {

fld1.value = "255,225,225";

}



There are other variable, but I have just set out one above.



I think that you will be able to achieve what you are looking for if you access the ui.#checkButton.border.fill.color property using the xfa.resolveNode method.



Good luck,



Niall



ps instead of transparent, you could set the default colour of the checkbox the same at the background colour of the form/table. Then the mouse enter colour would be yellow and the mouse exit colour back to the default.



N.

Avatar

Level 10
Hi Bet,



Just thought of something - if you code the fill of the checkbox (hazard1) to solid on mouse enter and invisible on mouse exit:



hazard1.border.fill.presence = "visible"



and



hazard1.border.fill.presence = "invisible"



You may need to do this using XFA Resolvenode:



var fld2 = xfa.resolveNode("form1.p4c.hazard1.ui.#checkButton.border.fill.presence");

fld2 = "visible"; // or fld2.value = "visible"; I am not sure!!



You would need to put the visible script before the yellow script. I haven't tested it but it might be worth a go.



N.

Avatar

Level 4
I did try the option of having the border fill with the colour black on exit but the whole checkbox filled with black instead. Niall, these are great ideas, but regrettably they dont work in this particular application.



It was a nice wish to continue highlighting the active field but this time it just isn't going to work. The form I'm building has a large number of tables with rows of text and columns of checkboxes (non-captioned).



In Acrobat this was easy... with LiveCycle not so much!



Thanks for your help.

Avatar

Former Community Member
How woudl you have doen it in Acrobat? At worst case we can invoke Acrobat commands from within Livecycle if we cannot do it with LiveCycle.