×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    131

    Exclamation How to change Listbox item position of Listbox using Up/Down arrow key?

    I am having one listbox in my application, I am having fixed number of items inside say Item1 to Item10 arranged in sequence.

    Now I want to move or change position of item10 (which is focused) at item1. I mean I want to move last item10 at 1st position in listbox using up arrow key....

    I am not finding way to do that can any body guide me how can we do that?

  2. #2
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: How to change Listbox item position of Listbox using Up/Down arrow key?

    You can change the list element array and update the listbox when you receive the key event. Probably you should describe a bit more in what scenario would you want to add this behavior. Is it something like setting priority.

  3. #3
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    131

    Re: How to change Listbox item position of Listbox using Up/Down arrow key?

    Quote Originally Posted by kamalakshan View Post
    You can change the list element array and update the listbox when you receive the key event. Probably you should describe a bit more in what scenario would you want to add this behavior. Is it something like setting priority.
    yes you are correct I want to set priority...
    In listbox Options (Left Softkey), I will have Move menu, once Move Option will be selected, item focused in listbox should move in listbox using up/down key and once middle key is pressed item should be placed at position where it is moved.

  4. #4
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,089

    Re: How to change Listbox item position of Listbox using Up/Down arrow key?

    you can maintain two indexes , one for the item which is focused at the time when you have pressed 'Move' menu item(say iMovefocus) & second one , when the middle key is pressed(say iPressed).Now after middle key is pressed, remove the item which is at iMovefocus position in the array of listbox and at the same time , insert the same element into the array at the iPressed position in the array.

    Also do remember to get the element name before removing it, so as to insert it at the changed position.

Similar Threads

  1. [Moved] how to change image of Listbox Item.
    By manishpinjani in forum Symbian User Interface
    Replies: 5
    Last Post: 2010-06-02, 12:33
  2. how to change image of Listbox Item.
    By manishpinjani in forum Mobile Java General
    Replies: 3
    Last Post: 2010-06-02, 10:32
  3. change the position of a listbox...
    By nital_shah in forum Symbian
    Replies: 14
    Last Post: 2009-10-07, 13:58
  4. how to enable up&down keys in listbox
    By venkatesh.pampana in forum Symbian
    Replies: 2
    Last Post: 2008-11-12, 07:44
  5. Change color of listbox item
    By anoopd in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-03-09, 08:33

Posting Permissions

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