Reputation: 2684
My button doesn't have a blue focus ring around it, even though it has focus.
I've got a component with a RadioButtonGroup and a Button. After a selection is made in the RadioButtonGroup, focus is switched to the Button. I added click="focusManager.setFocus(myCloseButton)" on the VBox.
After, a radioButton is selected, if the user clicks the spacebar the Button fires. So, as I understand it focus was switched to the button. But, the button doesn't get a blue focus ring surrounding it. How do I get the focus ring?
(I have visible="false". I turn them to visible, after some effects are finished. So, don't let that throw you.)
<mx:VBox id="radioVBox" visible="false" click="focusManager.setFocus(myCloseButton)" >
<mx:RadioButtonGroup id="rgb1" itemClick="goClickHandler(event); "/>
<mx:RadioButton groupName="rgb1" label="{answerA}" value="{answerA}" />
<mx:RadioButton groupName="rgb1" label="{answerB}" value="{answerB}" />
<mx:RadioButton groupName="rgb1" label="{answerC}" value="{answerC}" />
</mx:VBox>
<mx:Button id="myCloseButton" label="Close"
width="100" height="40"
fontSize="20" fontWeight="bold"
click="closeHandler(event)"
visible="false" fontFamily="Verdana" />
Any suggestions?
Thank you.
-Laxmidi
Upvotes: 1
Views: 1244
Reputation: 74
You can force Flex show the focus drawing after your component get focus with something like this:
focusManager.getFocus().drawFocus(true);
also, you can try someting like:
myCloseButton.drawFocus(true);
Hope it helps.
Upvotes: 1