1 Reply Latest reply on Mar 7, 2009 5:56 PM by Moenizzle

    Canvas component won't receive focus

      As you can see from the attached code, I have 2 TextInput fields followed by a Canvas. I would like the canvas to receive focus after I tab away from the second field but it doesn't, even when I set the following properties of the Canvas:

      1. focusEnabled = true
      2. tabEnabled = true
      3. tabChildren = false

      The drawing of the focus aside, shouldn't the Canvas's keyFocusChange event be firing after I tab out of the second field?

      Any help would be GREATLY appreciated!

      Thanks in advance,
        • 1. Re: Canvas component won't receive focus
          Moenizzle Level 1
          Ah, success! Apparently, to receive focus a component needs to implement the IFocusManagerComponent interface. Strangely, Canvas has all of the requisite methods so all that needs to be done is creating an MXML component that implements mx.managers.IFocusManagerComponent. Well, this is in addition to setting the tabEnabled = true and focusEnabled = true (tabChildren = false was just a wild guess I made early that turned out to be unnecessary).

          Anyway, hope this helps someone save a few minutes.