Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

setting attributes of text/input fields at runtime

Avatar

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

Avatar

Avatar
Validate 1
Level 9
Steve_L_Walker
Level 9

Likes

197 likes

Total Posts

1,435 posts

Correct Reply

212 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 9
Steve_L_Walker
Level 9

Likes

197 likes

Total Posts

1,435 posts

Correct Reply

212 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
Steve_L_Walker
Level 9

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