You could use the errorString property of UIComponent. When set to a non
empty string, flex draws a red border (I think the color is also
configurable) around the component and shows the string in a tooltip when
the mouse is moved over it. You could use it like this:

if(currentFormItemValid)
{
   currentFormItem.errorString = "Your error message to the user";
}
else
{
  currentFormItem.errorString = "";
}


Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com




On Thu, Nov 27, 2008 at 1:57 PM, what3v3r82 <[EMAIL PROTECTED]>wrote:

>   Hi,
>
> I want to change the themeColor of a TextInput, so each time a user
> types something the change event handler will validade the form and
> change the color of the theme according to the validation result.
>
> To sum it up I have something like this in my textinput change handler
> function:
>
> if(currentFormItemValid)
> {
> currentFormItem.setStyle("themeColor", "#eaeaea");
> }
> else
> {
> currentFormItem.setStyle("themeColor", "0xFF0000");
> }
>
> The problem is that nothing happends... if I do currentFormItem.text
> += 'A'; I can see that the code is being executed.
>
> I also tried the callLater method but had no luck.
>
> Anyway how can I fix this? Is there a better way?
> thanks
>
>  
>

Reply via email to