I’m working on an application in Flex 3.2, and I need to be able to tell whether the current focus is a textbox or not. How would I go about doing this? There’s more than one textbox in my application, so I can’t really set multiple event handlers for focusOut, etc.
Thanks,
Matt
You can accomplish this by using the
stage.focusproperty. It holds the instance of whatever object has the focus.So in whatever spot you want to do the check, just do this:
I’m not really a flex user, but I’m pretty sure the text components use TextFields inside them and that the focus will still be a TextField class. Someone please correct me if I’m mistaken.