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

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: blackberry focus..

The problem as I understand it, is that the screen displays a number of buttons, horizontally like 'tabs'.


When on of these buttons is clicked, the contents of the page changes and focus moves to the newly added contents. 


However when scrolling back to the buttons, the OP want the focus to first go to the selected button, not to the last button.


Is this a correct summary of the problem.


This specific question has been asked before.  If you search you should probably find a Thread.  I don't remember exactly what people have found solved the problem, but I think the general answer is to override movefocus (or one of the focus methods) in the Manager that contains the buttons, so that if focus comes 'back' to the Manager, it does a 'setFocus()' on the selected Button.  In all other cases, it calls super.... to handle left and right focus changes.


Hope this helps.