KeyboardFocusTraverser that is locked to children of the component that implements it?

Is it possible to create a KeyboardFocusTraverser that will only return components that are a direct child of the component which implements it? I can’t find too many resources on the topic.

The requirement is essentially that if we are displaying some popup menu, we want focus to only cycle between the components of the popup menu.

I was just recently “fighting” this part of JUCE and I don’t believe cycling is supported. But this part of the code inside JUCE is not that big, if you are willing to do some alterations, you should be able to solve this relatively fast.

1 Like