Highlighted

setting attributes of text/input fields at runtime

Avatar

Guest

20-02-2009

I am currently defaulting some text to an input field at the docReady event by checking to see if the InpField1.rawValue = NULL.



What I would like to do now is either turn the background fill color to gray or to make the field read only until the user clicks on it to enter their text.



Using the Click event, I'd like to revert the color to normal or set the mode to input when they click to enter their text.



How can I set the attribute of the input field? I see setAttribute but i'm not sure which attributes can be set if any, at runtime.



thanks alot.

Replies

Highlighted

Steve_L_Walker

20-02-2009

Robert,



I assume InpField1.rawValue = NULL is pseudo-code.



Try the following in the initialize event of InpField1:



To set the color to grey



InpField1.ui.oneOfChild.border.fill.color.value = "190,190,190";



To set the access to read only



InpField1.access = "readOnly";



To reset access to user entered optional change the access property to "open" on the enter event.



Many examples can be found here

http://www.adobe.com/devnet/livecycle/designer_scripting_samples.html#changing_appearance



Steve