×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    112

    Getting form position, how?

    Is there a way to find out the position (cursor) on form. I am trying to develop an application that has some softkey commands, but they should function differently depending on the position. Let's say you are on a TextField when you press the softkey, A should happen. But then again, if you are on an Image, B should happen. How should I go about doing this?

  2. #2
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: Getting form position, how?

    Hi,

    AFAIK it is not possible to get the position in a form similar to that in the list.

    The first idea that comes to my mind is to add the same commands to the items rather than to the form. Set the itemcommandlistener. in the item command action you can check which item is present and it can be routed to the corresponding action
    commandAction(Command c, Item item)


    Wang

  3. #3
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    112

    Re: Getting form position, how?

    Thank you for that suggestion. I am trying it out right now. I still would need to find out the position of that Item in the form, because I would like to replace it with another one. Now it should be easier because I know what the Item is, but I still can't find a method to find the position in the form. Is there an easy way to figure it out?

    I figured out that if everything else fails, I can loop through all the items in the form and see which one matches the item that had the command in it. I just hope there would be a nicer way. Any thoughts?

    EDIT: At least I got it working now with this looping way. I would appreciate if someone would tell me, if there is a better way also. Thanks
    Last edited by pillar; 2006-04-28 at 08:14.

Similar Threads

  1. second form not getting key events
    By krsunil in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-12-10, 10:29
  2. Cannot create form
    By Norrit_ in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-03-08, 15:21
  3. customItem's position within the form
    By fabito in forum Mobile Java General
    Replies: 2
    Last Post: 2005-12-23, 17:49
  4. placing control on specific position on form
    By anish.agarwal in forum Symbian User Interface
    Replies: 2
    Last Post: 2004-08-16, 08:52
  5. Form not displaying
    By Shabs in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-07-09, 16:38

Posting Permissions

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