08-24-2009 03:15 AM - edited 08-25-2009 02:38 AM
Hi all,
I am created screen with a title bar and toolbar.
The toolbar is created using a HorizontalFieldManager.
Toolbar contain three BitmapField and a LabelField.
How can i handle key events of fields in the HorizontalFieldManager.
Where i need to override the keyChar() method.
I did anything wrong here. I am not getting the Dialog box on pressing the enter key. It is moving to next icon thats all.
I can move to each icon by using the arrow keys, it is getting focus also. But when i press the enter key, it is going to next icon.
I want to show new screen on pressing the enter key on each icon in the HorizontalFieldManager.
How can i solve this problem.. Any help...
Solved! Go to Solution.
08-24-2009 04:41 AM
Override KeyDown() in your MainScreen. Like:
public boolean keyDown(int keycode, int time) { System.out.println("Enter key pressed!"); if (icon1.isFocus()) Dialog.inform("show page1"); else if (icon2.isFocus()) Dialog.inform("show page2"); else Dialog.inform("show page3"); return true; }
Regards
Bikas
08-24-2009 06:46 AM
Thank you very much Bikas...
It solved my problem.
08-24-2009 06:47 AM