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
Developer
Posts: 139
Registered: ‎05-25-2009
My Device: Not Specified
Accepted Solution

How to move to the next Component?

Dear Friends,

 

          Can any one tell me how to move the focus to next component in the screen .Actually i am having one verticalmanager with verticalscroll this vertical field manager consists of edit field with approximately 100 lines of data.Below this vertical field manager i am having one button .If i want to move that button means i have to pass through all those 100 lines in that edit field.Is there is anyway to pass the focus to button directly by clicking single button.If you have any idea to solve this problem pls help me if you can pls provide me some code snippet.

 

regards,

s.kumaran.

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to move to the next Component?

you can use setFocus to set the focus to a certain field. how you trigger this is your choice, you could, for example, use enter, or alt+some key. use keychar or keydown method for key handling.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 139
Registered: ‎05-25-2009
My Device: Not Specified

Re: How to move to the next Component?

Hi Simon,

          Thanks for ur immediate response,Ur logic is working .I can made code to move to button by pressing  "ESC" key but now i can't edit anything in the editfield which is in the verticalmanager.Can u suggest me how to solve this problem.

 

 

regards,

s.kumaran.

 

 

Highlighted
Developer
Posts: 166
Registered: ‎05-07-2009
My Device: Not Specified

Re: How to move to the next Component?

It's hard to guess what is wrong but it looks like that you somewhere handle some key event (probably keyDown) to check for shortcut you use and "eat" all key events by returning "true" in all cases instead of calling super method.

It would be much easier to help you if you provide some code


--------------------------------------------------------------------------------------------------------
If your issue is solved, set "Solution" mark at the relevant post.
Don't hesitate to Kudos people whose posts helped you.