>From the focus guru:

 

Actually, Flash will remove focus from a textfield when the mouse is
clicked outside of the textfield.  The Flex FM always tries to make sure
something has focus always (generally a good practice for accessibility)
so it will not let focus go away unless something else is clicked that
is IFocusManagerComponent and has mouseFocusEnabled=true.

 

You have to implement IFocusManagerComponent in order to be a focus
candidate from the Flex FM perspective and have focusEnabled=true to
actually receive focus.  mouseFocusEnabled says whether you want to
receive focus via mouse clicks, tabEnabled says whether you want to
receive focus from the keyboard.

 

focusEnabled=false is a good way to disable child components like
scrollbars that shouldn't receive focus

 

HTH,

-Alex

 

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel Freiman
Sent: Thursday, November 16, 2006 12:18 PM
To: [email protected]
Subject: Re: [flexcoders] Understanding the FocusManager

 

There's not any specific question yet.  But I foresee two issues.  

1. What prompted the question was that I had a UITextField that wasn't
losing focus when I clicked on UIComponent.  I know this specific
example would be guided by the player's focus manager and not
mx.Managers.FocusManager, but I thought there might be some interaction
between the two managers I could leverage.  For now I have a workaround
of setting the selection to an off screen object.  What I'm worried
about is that in Flash 8 this type of problem tended to compound and I
actually spent 40% of my time just trying to resolve focus issues
because I didn't understand focus when I started writing the program. 

2. My second issue is just that I want to make sure I'm using the object
properties correctly (focusEnabled, mouseFocusEnabled).  From reading
the docs, they seem to enable receiving focus events, but set focus to
only objects that have mouseFocusEnabled=true? 

If either of this spark a specific answer, I would appreciate it.  If
not I'll just wait until I come across a more specific problem.

Thanks,

- Dan

On 11/16/06, Matt Chotin <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
wrote:

Hi Dan,

 

There aren't any real docs with details on it.  If you have specific
questions I can try to have an engineer respond.

 

Matt

 

________________________________

From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com
<http://ups.com> ] On Behalf Of Daniel Freiman
Sent: Wednesday, November 15, 2006 8:46 AM
To: flexcoders
Subject: [flexcoders] Understanding the FocusManager

 

Does anyone know where there is a good overview of how focus and the
FocusManager works in flex.  I've searched through the docs, the dev
center and google, and haven't been able to find anything.

thanks in advance, 

- Dan

 

 

Reply via email to