×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jan 2010
    Posts
    52

    Getting a Form selected item

    Hey guys,

    I have this MIDlet with a few in editable text fields in it. I also have a custom List object I made that allows the user to select an item from it.
    When I run the MIDlet, the user can select (or highlight) all the text fields by using the arrow keys. I want that when the user will press OK, I'll know what textfield is currently selected so as to know which list I need to display. Something like form.getSelectedItem(). How can I do this? Can you think of a better design to this issue?

    Thanks!

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Getting a Form selected item

    You could attach the "OK" Command to the Items instead of the Form. When the Command is selected, the ItemCommandListener will be told which Item was selected. (You can attach the same Command to more than one Item.)

    Does that help?

    Graham.

Similar Threads

  1. How retrieve selected item from sorted listbox
    By dracula78 in forum Symbian User Interface
    Replies: 6
    Last Post: 2011-08-15, 15:20
  2. Find which item is selected on Form
    By prajapati.ajay in forum Mobile Java General
    Replies: 2
    Last Post: 2009-03-25, 15:38
  3. selected item value in list
    By Nourayn in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-01-24, 11:23
  4. display form on click of listbox item
    By Kapil Kaushik in forum Symbian
    Replies: 0
    Last Post: 2006-03-16, 09:38
  5. Keep track of highlighted ITEM on form
    By ymtoh in forum Mobile Java General
    Replies: 1
    Last Post: 2005-12-28, 00:36

Posting Permissions

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