×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    6

    Setting focus and tabing between TextField objects

    Ive been working on a simple application which has a login screen. I need to make it so that when you press the 'enter/confirm' button it tabs to the next text box. At them moment pressing enter simply adds a newline. I have been using the TextField class for text and setting it to TextField.ANY. Can anyone help? Perhaps im doing it wrong or using the wrong class?
    Last edited by jeffez; 2010-04-10 at 11:30.

  2. #2
    Registered User
    Join Date
    Sep 2009
    Posts
    6

    Re: Setting focus and tabbimg between TextField objects

    Anyone? even some sort of way of setting focus on text fields would be useful. So far i cant find a way to do this..

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Setting focus and tabing between TextField objects

    Try using LWUIT, where you can move the focus from one item to another item on the form.
    Put a itemStateChangeListner() on the textfield check if user has pressed enter key, move the focus to other.

    Shifting focus from one to other in J2me MIDP is not possible thu API.

    thanks,
    ~Amitabh
    Last edited by im2amit; 2010-04-12 at 06:16.

  4. #4
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    208

    Re: Setting focus and tabbimg between TextField objects

    Using J2ME Form makes simplest things impossible. With J2ME form you cannot set focus on a specific item - there is no such API available. Use LWUIT or your own Canvas class based implementation to get more flexibility.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •