Welcome!

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

Reply
Trusted Contributor
Posts: 109
Registered: ‎11-15-2011
My Device: blackberry 9800
My Carrier: beginner developer

focus fields on blackberry

I have 5 fields on my screen. I work on 9300 not a touch device 

--------       ---------
   1              2
--------       ---------
------------------------
            3'/3''
-------------------------
            4
------------------------

 

I want when I click field 1 the focus change to the field 3'and if I click field 2 the focus change to field 3''. And when I click the down button the focus change to field 4.

What I have know the focus was in field 1 then 2 then 3''. I can't access to field 3' or pass to field 4. How can I order the focus of fields thanks

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

Re: focus fields on blackberry

I'm not 100% sure what you are asking here, so sorry if I don't give you the right answer.

 

When using the trackpad, the focus movement depends on the Managers involved, the order the Field are added to these Managers and the direction in which you swipe the trackpad. 

 

So for example, VerticalFieldManagers usually treat down swipe (and I think right swipe) as an indication to move the Fields added later (and so lower on the screen) and vice versa.

 

HorizontalFIeldManagers will treat left and right as you expect, and up and down as indications the user wants to move out of the HFM.  When scrolling on to a HFM, the last Field is focused if moving from the bottom, the first is moving from the top. 

 

You can usually control the movement as you want by overriding navigationMovement and deliberately setting focus as you want.  If you want to see an example of this, have a look at the code in here:

http://supportforums.blackberry.com/t5/Java-Development/Create-a-rich-UI-layout-with-TableLayoutMana...

 

I hope with this information you can look at again at how you created the screen we see, and perhaps get an idea about how to control the focus movement yourself.