12-12-2009 02:41 AM
I have two vertical field manager and three horizontal field manager Each have two buttonfield totally six button fields on the screen when I scroll the focus should move from top to bottom but focus is going from left to right.
but now B1->B3->B5->B2->B4->B6
How to control the focus on the button field
12-12-2009 08:58 AM
Picture is not visible.
Default behavior for all managers is focus on the last field in the their list when focus comes back to them, and the first on the list when focus moves forward to them. So by carefully using the managers you have, you might be able to manage the focus movement you want. Alternatively you will have to override the focus behavior for the manager to set the focus where you want to be.
There are other posts that talk about this, specifically for HorizontalFieldmanagers. Have a search of the forum and you will probably find someone else has tried to do something similar. You will need to look at onFocus and moveFocus.
Alternatively, you might find the that TableLayoutManager will layout your Fields without requiring multiple Managers and focus will move as you want. You can find code for this manager, in the following KB Article.
How To - Create a rich UI layout with TableLayoutManager
Article Number: DB-00783