Question : Flash tabing and button listeners

Hey i have forms where there are textinputs and buttons, The buttons have listeners so that if they have focus and the enter button is pressed then the click event is called. My problem is this  if i tab to the button using the tab key and then manually select a textinput using the mouse there still seams to be a focus ring around the button, thus if i press enter in the textinput, which i need, the button event is called

Any ideas

Answer : Flash tabing and button listeners


Always call the base (or super) class in your override Focus function. If you do not then the system will not set the focus to the element. See also my answer to your other question.

override function onSetFocus(newFocus:Object):Void
{
     super.onSetFocus(newFocus);
     // your code starts here
}

This is essential so the system can do all the drawing, setting the focus and refreshing of the canvas first.
Random Solutions  
 
programming4us programming4us