For instance, create custom button class extending Canvas; set buttonMode to true, set focusEnabled to true. Still nothing.
Step in IFocusManagerComponent. Interestingly, UIComponent implements this interface, which is what the FocusManager looks at to decide whether, or not, to focus your component. All you need to do is explicitly tell Flex that your component implements it, and you're away:
<?xml version="1.0"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" implements="mx.managers.IFocusManagerComponent"
buttonMode="true" focusEnabled="true">
...
</mx:Canvas>Hopefully that'll clear this up for some people as this drove me round the bend several times.
No comments:
Post a Comment