views:

129

answers:

1

I have a custom TextInput-based component for date and time with certain restrictions on what's considered "within range". But it's still fine to insert dates that are outside the range.

When a user types in a date, on valueCommit, I'd like to be able to display a hovering notification to the user, to inform/warn them that the date is outside the accepted range.

I'm thinking of notifications ala the Validators, but I'd rather not use the Validator mechanism because it's really not validation, just notification. Something like a tooltip, but it will only appear if the user changed the value. Maybe an effect of some sort?

If anyone has any ideas or if anyone has done something like this, I'm all ears!

A: 

So I know you said you don't want to use validators, but at the same time, that sounds exactly like what you're describing. You're not validating the whole form though, just checking a field to make sure it confirms to some standard. You'll want to check out the use of validators with errorString:

http://livedocs.adobe.com/flex/3/html/help.html?content=validators_5.html

quoo
Well, I have 2 reasons why I don't want to use validators. First, validators just outlines the input component in red - I want the notification to automatically show itself without needing a mouseover. And second, the validator text has red background, and to change it, I'd have to override the style for _all_ validators, which I can't do, since we do use validators elsewhere.
aberrant80
I think then you'd have to create a custom component. You might be able to utilize the PopUpManager code or maybe even the ToolTipManager to place the element, which could just be a simple canvas skinned to look like an error string tooltip.
quoo