Change Font Color In Textbox Problem
Posted: Thu Mar 08, 2012 2:32 pm
I wanted to implement one of the textboxes as follows:
When the box is empty, I display some default help text in a light grey color - for example, for a phone number it might say "7 digits, no area code"
When the user taps the box to edit it, the text disappears, the text color changes to black, and thus anything the user types on the keyboard shows in black.
The only part of this that does not work is switching the text color. I have tried putting a script in the field, and I have tried using a button to manually change the color of the text in the field, but no dice.
The magic code is
set the uuiTextField["textColor"] of group "test1" to 0,0,0
And to prove that it works,
answer the uuiTextField["textColor"] of group "test1"
I get the 0,0,0 reply but the text color is not different.
When the box is empty, I display some default help text in a light grey color - for example, for a phone number it might say "7 digits, no area code"
When the user taps the box to edit it, the text disappears, the text color changes to black, and thus anything the user types on the keyboard shows in black.
The only part of this that does not work is switching the text color. I have tried putting a script in the field, and I have tried using a button to manually change the color of the text in the field, but no dice.
The magic code is
set the uuiTextField["textColor"] of group "test1" to 0,0,0
And to prove that it works,
answer the uuiTextField["textColor"] of group "test1"
I get the 0,0,0 reply but the text color is not different.