This content has been marked as final. Show 3 replies
Try extending the canvas control, and make your extension implement the IFocusManagerComponent interface.
I have tried to do this but it doesn't seem to work. From my understanding of interfaces I should have to implement the methods. If so, what methods need to be implemented and how?
What seems to happen is that the component is not added to the Focus Manager list of focusable objects. I tried to use the setFocus() method but that doesn't work either.
There is actually code in the base class that tests for whether the (extended) class implements the interface, so you don't need to add any methods - the interface itself is used as a "marker interface". Try setting the focusEnabled property to true as well (if you haven't already).
If none of this works, have a look at the source of the canvas class - from within flexBuilder, hold down Ctrl and click on the reference to Canvas in your class (extends...). This should open the source in your editor and you can search for "focus" and probably find our where it's going wrong.