Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 77
Registered: ‎04-01-2011
My Device: Bold 9700
My Carrier: Rogers
Accepted Solution

Yet another question about focus with tab panes


I'm quite new to this, but I have been scouring the boards and trying many different things, and I've decided to seek advice.


There are other threads similar to my problem such as :






I have a tabbed pane set up based on the example and all works well until I delete a row from a VerticalFieldManager. It defaults the focus to the first item on the screen, and I get that. My problem is trying to override/replace that behavior.


My MainScreen implements the FocusChangeListener for the tab buttons (custom LabelFields).


I've tried many different variations - I've tried to manage the focus totally manually and ended up with a bit of a mess. I've tried catching the navigationUnclick() event and coding the focusChanged() method to manually switch the focus, but it seems that the focusChanged() method gets called before the focusChanged(), which doesn't help me.


As I said I'm fairly new to this so I could be doing something very stupid, but I don't really understand the focus handling implementation. A kick in the right direction would be appreciated.





Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Yet another question about focus with tab panes

You might want to have a NullField in your Managers before all other fields - this way, even if you delete the rest, the NullField might retain the focus.

If it doesn't help, try also overriding sublayout for your managers, call super.sublayout and then explicitly setFocus to your NullField (any field deletion causes a displayed Manager to re-layout).

please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Posts: 77
Registered: ‎04-01-2011
My Device: Bold 9700
My Carrier: Rogers

Re: Yet another question about focus with tab panes


I tried inserting a NullField and it worked like a charm. It's a nice simple solution. Thank you arkadyz.