change the color of selected text dynamically
Hallo everyone,
I want to change dynamically the text color when I mark and select a text. The fact is:
I am having a procedure which changes the text color to red if there is an error such as:
if (minute1 == 0) {
result.text = "Error. Not applicable";
result.textColor = 0xBE0C26;
clearAll();
}
This is just a piece of code from my calculator whichconverts the values between different units such as minute second day hour etc.
clearAll() function sets the default values. If I define the default text value under my clearAll function it changes the error message's color to the default text value. That's why I can't define its default color value under clearAll. But the text color remains as red when I try to enter another value. That's why I need such a function which turns the selected text color to its default value. I tried to use the
formStyleFormat.textSelected = 0xffffff;
function but it didn't help me. Can anyone help me?
Your attitude determines your altitude
__________________
Your attitude determines your altitude
|