Highlighted

Transparent borders or fill

Avatar

Avatar

SciMax

Avatar

SciMax

SciMax

06-03-2009

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

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

06-03-2009

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

Avatar

Avatar

SciMax

Avatar

SciMax

SciMax

06-03-2009

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?
Highlighted

Avatar

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786
Niall_O_Donovan

08-03-2009

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.
Highlighted

Avatar

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786

Avatar

Niall_O_Donovan

Total Posts

4.4K

Likes

645

Correct Answer

786
Niall_O_Donovan

08-03-2009

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.
Highlighted

Avatar

Avatar

SciMax

Avatar

SciMax

SciMax

11-03-2009

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.
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

11-03-2009

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.