Thanks for the info Alex. I will look at the Accordion source code. Its a bummer that we cant use a custom FocusManager for a custom component.
Part of my problem is also that my component renders only a sub-set of all its children on the screen. It maintains a faceless state object for all its children and renders a few of them onto the visible area of the stage. The default behaviour of the FocusManager seems to be to respect the tab index of only the visible objects, whereas what I really need is for it to tab across the state objects, hence a custom method. It would have been ideal if there was a way to override the "getNextFocusManagerComponent" method of the FocusManager, just for my custom component. Anybody out there who has done this or know any place in the framework where this has been done? TIA - superabe On 8/7/07, Alex Harui <[EMAIL PROTECTED]> wrote: > > There aren't any hooks for replacing the current FocusManager. > > > > By definition, the focus manager does a depth first search for focusable > entities so if you have: > > > > <VBox> > > <HBox> > > <Button /> > > <Button /> > > </HBox> > > <HBox> > > <Button /> > > <Button /> > > </HBox> > > </VBox> > > > > The buttons' will get focus in order. > > > > If you don't particularly like that, you can set tabIndices, but that can > be hard to manage in a dynamic environment. > > > > You can write your own focus handler and shut down the current focus > manager, but there aren't any examples or docs as far as I know. > > > > Accordion has much of the tabbing behavior you want. You could turn off > tabChildren in the other sub-containers until you see an arrow key. > > > > -Alex > > > ------------------------------ > > *From:* [email protected] [mailto:flexcompone > [EMAIL PROTECTED] *On Behalf Of *superabe superabe > *Sent:* Monday, August 06, 2007 8:00 PM > *To:* [email protected] > *Subject:* [flexcomponents] Custom FocusManager > > > > I have a custom component extending VBox that contains n number of > children. > > I'd like the tabbing behaviour to be such that once I set focus on a child > the tab cycles through the sub-children of that child (using the tab indices > on the sub-children) > It should continue to do so till an arrow key press changes the focus to > another child > > The docs on FocusManager indicate each instance of the FocusManager > manages its own tab loop, leading me to believe that I need to create a > FocusManager for each child (VBox). > The problem is, I cant see any examples on how I could set this up. > > Any ideas? > > TIA > > - superabe > > >
